I generated a PNG using Java, then I tried a third-party PNG encoder and also tried spawning an optipng process.
The third-party encoder is written in Java and is of course faster than spawning a process, but what astonished me is that, in some cases, the third-party encoder produces PNG smaller than optipng can. I attach one such example so that you can analyze it better that I can do and maybe improve optipng.
(there seem to be more zeroes between the header and the content)
test-1-java.png - Java ImageIO.write
test-2-pngencoder.png - objectplanet.com/pngencoder/
test-3-optipng.png - optipng -o7 test-1-java.png
test-4-optipng-zn19.png - optipng -o7 -zm1-9 test-1-java.png
Log in to post a comment.