3 ms·
For PNG it absolutely does depend on the tool. Here's why: PNG has a pre-processing step to turn pixel data into bytes, then a general purpose compressor is us
by tialaramex 8y ago
For PNG it absolutely does depend on the tool.
Here's why: PNG has a pre-processing step to turn pixel data into bytes, then a general purpose compressor is used on the bytes. The algorithm used is picked per row, and if you pick the right one the compressor will have a better shot at small output, but which algorithm is best for each row of your image?
The popular libpng reference implementation contains a weak heuristic to pick algorithms that might do well, but a tool can do much better... Or it can do much worse. Early PNG support in Adobe Photoshop just picked "do nothing" for every row, resulting in huge PNG files.
- snowwrestler 8y agoInteresting... can you ballpark the percent improvement folks would expect to see between the most well-known image tools or libraries available now?
- fps_doug 8y agoI suggest you just try running optipng on some random PNG files you have on your HDD. Results vary greatly, but I've seen savings between 10 and 20% on files coming from GIMP where I always set the compression to 9 (maximum). I never touched Photoshop in my life so no idea what you can tune there and what its defaults are, but general experience shows that a lot of people either just don't bother and go with the defaults, or go all crazy clicking and manipulationg everything without knowng what's going on. I agree with you that for JPEG there is no silver bullet, but like that other comment here suggests, you could perfectly just run optipng on max settings in a cronjob and call it a day, because you know there will be absolutely no quality loss if you don't explicitly request it.
- MaxBarraclough 8y agoHere's a blog post that compares them. Apparently the difference can be pretty extreme: http://daleswanson.blogspot.com/2013/08/a-comparison-of-png-compression-methods.html http://daleswanson.blogspot.com/2013/08/a-comparison-of-png-...