OptiPNG by default runs through only about ten compression methods. To go through the full lot (it’s in the high hundreds) to find the best IDAT compression method use:
optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 file.png
Note this can take some time if you are working with medium to large PNG files but can bite off a few more bytes off your file without loosing data. I’ve found it most useful when working with web applications that feature a heavy icon set and with so many tiny images it was definitely worth it. We ran into one issue whereby OptiPNG would change the colour type of the image to achieve a better compression (this is on by default) but the output would render strangely in IE and Firefox under Windows. Add the -nc flag to disable colour type reduction.
OptiPNG by default runs through only about ten compression methods. To go through the full lot (it’s in the high hundreds) to find the best IDAT compression method use:
optipng -zc1-9 -zm1-9 -zs0-3 -f0-5 file.png
Note this can take some time if you are working with medium to large PNG files but can bite off a few more bytes off your file without loosing data. I’ve found it most useful when working with web applications that feature a heavy icon set and with so many tiny images it was definitely worth it. We ran into one issue whereby OptiPNG would change the colour type of the image to achieve a better compression (this is on by default) but the output would render strangely in IE and Firefox under Windows. Add the -nc flag to disable colour type reduction.
Thanks for the article.