I am generating lots of images in java and saving them through the ImageIO.write
method like this:
final BufferedImage img = createSomeImage();
ImageIO.write( img, "png", new File( "/some/file.png" );
I was happy with the results until Google's firefox addon 'Page Speed' told me that i can save up to 60% of the size if i optimize the images. The images are QR codes, their size is around 900B each and the firefox-plugin optimized versions are around 300B. I'd like to save such optimized 300B Images directly from java.
So here my question again: How to save optimized png images with java's ImageIO?