Page 1 of 1

Kick out jpg...

Posted: 20 Nov 2006, 00:26
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... :)

Re: Kick out jpg...

Posted: 20 Nov 2006, 18:39
by DevUrandom
Agreed, go for it...

Re: Kick out jpg...

Posted: 21 Nov 2006, 00:28
by Terminator
Agree with it , but jpg - have little weight than png. (& simpler)

Re: Kick out jpg...

Posted: 21 Nov 2006, 01:48
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.

Re: Kick out jpg...

Posted: 12 Dec 2006, 16:37
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.

Re: Kick out jpg...

Posted: 12 Dec 2006, 19:39
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.

Re: Kick out jpg...

Posted: 14 Dec 2006, 00:34
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.

Re: Kick out jpg...

Posted: 14 Dec 2006, 01:05
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.)

Re: Kick out jpg...

Posted: 14 Dec 2006, 03:50
by kage
in that case, unless you unzip the entire .wz file into memory, it definitely wouldn't matter either way.

Re: Kick out jpg...

Posted: 17 Dec 2006, 22:59
by Kamaze
kage wrote: ...
Don't forget, that PNG is a lossles format. (ATM)

Re: Kick out jpg...

Posted: 18 Dec 2006, 01:59
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.

Re: Kick out jpg...

Posted: 18 Dec 2006, 10:48
by Kamaze
The PNG spec allows lossy compression. As an extension for example.
However, i would like a 'free' jpg alternative.