Re:PNG that works
by masklinn on Thursday March 17, 2011 @05:50AM
(#2335585)
PNG recompressors perform different optimization and try at different levels of hard, so the improvements coming from one compressor may be different (and combinable with) another's.
Furthermore, depending on agressivity they may change some encoding property of the PNG and make them easier (or harder) to recompress via other compressors.
The benefit of using both is that it often allows you to squeeze a few extra percentage point of compression. Ideally you should test all combinations of compressors (presence and sequence) but that tends to be a bit expensive, especially when you involve PNGOut as it takes a pretty long time to run.
FWIW, I just tried the following on a screen capture:
* OptiPNG alone
* PNGCrush then OptiPNG
* OptiPNG then PNGCrush
* Squash (which runs a sequence of PNGrush, OptiPNG and AdvPNG, it can also run PNGOut but I didn't install it)
The source file was 250K, the files that went through OptiPNG, PNGCrush+OptiPNG and OptiPNG+PNGCrush were compressed to 159K (with a slight edge for the one compressed via PNGCrush first: both Optis are 162997 bytes, while PNGCrush + OptiPNG is 162978) and the file compressed via PNGSquash is 144K (147249 bytes).
Furthermore, depending on agressivity they may change some encoding property of the PNG and make them easier (or harder) to recompress via other compressors.
The benefit of using both is that it often allows you to squeeze a few extra percentage point of compression. Ideally you should test all combinations of compressors (presence and sequence) but that tends to be a bit expensive, especially when you involve PNGOut as it takes a pretty long time to run.
FWIW, I just tried the following on a screen capture:
* OptiPNG alone
* PNGCrush then OptiPNG
* OptiPNG then PNGCrush
* Squash (which runs a sequence of PNGrush, OptiPNG and AdvPNG, it can also run PNGOut but I didn't install it)
The source file was 250K, the files that went through OptiPNG, PNGCrush+OptiPNG and OptiPNG+PNGCrush were compressed to 159K (with a slight edge for the one compressed via PNGCrush first: both Optis are 162997 bytes, while PNGCrush + OptiPNG is 162978) and the file compressed via PNGSquash is 144K (147249 bytes).