Is it possible to increase the compression ratio for PNG files when using ImageIO?
I can’t find any switch to set the compression level, so …
I’m asking because when I use XnView to save a 32bpp PNG with compression level set to “9” (highest value in Xnview), its PNG file is typically about 20-30% smaller compared to the one of ImageIO.
(The method using ImageIO says “PNG” as name and uses a BufferedImage of type TYPE_INT_ARGB).
Normally I wouldn’t bother, but the PNGs my Java tool writes are going to be used inside my little game… so size matters.
PS: I must be missing something. Because when you write JPEGs with ImageIO how would you specify the compression ratio?
{This doesn’t mean I want to compare the lossy JPG compression to the lossless PNG compression but the way to say it to ImageIO I mean.}