title: How to save optimized png images with java's ImageIO?
body: <p>I am generating lots of images in java and saving them through the <code>ImageIO.write</code> method like this:</p>
  
  <pre><code>final BufferedImage img = createSomeImage();
  ImageIO.write( img, "png", new File( "/some/file.png" );
  </code></pre>
  
  <p>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.</p>
  
  <p>So here my question again: How to save optimized png images with java's ImageIO?</p>