Kick out jpg...

Discuss the future of Warzone 2100 with us.
Post Reply
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Kick out jpg...

Post by Kamaze »

See topic.
Currently jpg is only used for menu backgrounds and screen shot dumping.

Both could be replaced by png.
The benefit would be, to throw out all the jpg libs etc... :)
We all have the same heaven, but not the same horizon.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Kick out jpg...

Post by DevUrandom »

Agreed, go for it...
User avatar
Terminator
Regular
Regular
Posts: 1077
Joined: 05 Aug 2006, 13:46
Location: Ukraine
Contact:

Re: Kick out jpg...

Post by Terminator »

Agree with it , but jpg - have little weight than png. (& simpler)
Death is the only way out... sh*t Happens !

Russian-speaking Social network Group http://vk.com/warzone2100
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Kick out jpg...

Post by DevUrandom »

Dunno about the simpler. I can't read either format. ;)
But for the weight you are right. But I think that the files are so small, that this wont matter much.
Per
Warzone 2100 Team Member
Warzone 2100 Team Member
Posts: 3780
Joined: 03 Aug 2006, 19:39

Re: Kick out jpg...

Post by Per »

I tried to do that a while ago, but the resulting PNG images when I converted the JPGs were way too big for my liking.
"Make a man a fire, you keep him warm for a day. Set a man on fire, you keep him warm for the rest of his life."
karmazilla
Trained
Trained
Posts: 84
Joined: 26 Aug 2006, 21:05

Re: Kick out jpg...

Post by karmazilla »

Per wrote: I tried to do that a while ago, but the resulting PNG images when I converted the JPGs were way too big for my liking.
PNG tuning can be a bit difficult, but with the right software, you can get very good results.
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Kick out jpg...

Post by kage »

just out of interest, i did some testing to see how well zip archive compression compares to png compression through gimp (presumably gimp doesn't compress it as well as tools specialing in png, but probably does a decent job).

for the test, i grabbed a jpg, and saved it to an uncompressed png through gimp, and then saved it to a seperate png with as much compression as gimp would allow. then i zipped each of these using the standard foss zip utility, with default compression (level 6) - that is, compressed.zip contains only compressed.png, and uncompressed.zip contains only uncompressed.png, and these were the results.:

Code: Select all

22K     original.jpg

165K   compressed.png
165K   compressed.zip

614K   uncompressed.png
171K   uncompressed.zip
i used zip compression to simulate the wz package format conditions.

now, given that default zip compression has almost the same level deflation as png compression, at least in this case, it seems to be of little benefit to compress the png's themselves, unless your computer has extremely slow disk access. i'd want a second opinion on this, but depending on if warzone stores the contents of wz files temporarily on disk or if it loads them into memory, better performance might actually be achieved by leaving the png's individually uncompressed.
  • if the zip file is unzipped, in whole, into main memory or on disk, then there'd be some small performance benefit to leaving them uncompressed, with the exception of being dumped onto a really slow disk (in which case io is the bottleneck).
  • if the zip file is initially catalogued, but then has required files selectively decompressed from the archive, then there'd be no notable difference between full png compression and no png compression, since zip wouldn't effectively be able to compress a self-compressed png, and an uncompressed png would get compressed by the zip archiver -- either way, it only has to go through one logical stage of decompression.
User avatar
DevUrandom
Regular
Regular
Posts: 1690
Joined: 31 Jul 2006, 23:14

Re: Kick out jpg...

Post by DevUrandom »

Given that libpng utilizes zlib, I'd guess that there is actually no difference at all (besides some file headers) between zipped uncompressed png and compressed png... (If compressed at the same levels.)
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Kick out jpg...

Post by kage »

in that case, unless you unzip the entire .wz file into memory, it definitely wouldn't matter either way.
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: Kick out jpg...

Post by Kamaze »

kage wrote: ...
Don't forget, that PNG is a lossles format. (ATM)
We all have the same heaven, but not the same horizon.
User avatar
kage
Regular
Regular
Posts: 751
Joined: 05 Dec 2006, 21:45

Re: Kick out jpg...

Post by kage »

Kamaze wrote: Don't forget, that PNG is a lossles format. (ATM)
heh, i never forget that: i use it extensively for that very reason, among others.

incase there was any doubt, not that it matters, i'm in favor of using png's over jpgs for this kind of stuff, especially given the eventually possible benefits of transparency and the apng extension spec (if they ever finalize that).

btw, kamaze: are you suggesting they're going to add lossy decompression options to the png format? i hope not, or it may well start ending up like wma's, which support both lossy and lossless, but aren't optimal for either, thus making it practically worthless.
Kamaze
Regular
Regular
Posts: 1017
Joined: 30 Jul 2006, 15:23

Re: Kick out jpg...

Post by Kamaze »

The PNG spec allows lossy compression. As an extension for example.
However, i would like a 'free' jpg alternative.
We all have the same heaven, but not the same horizon.
Post Reply