Hi Sébastien,
as so often, there is a tradeoff between computing time and compression - PNG has a few options for the 'filter' applied:
http://en.wikipedia.org/wiki/Portable_Network_Graphics#CompressionWith trying more of them, one has a better chance to find the best compression. Also the zip compression applied thereafter can compress faster or better, depending on how hard it tries.
Java ImageIO has a parameter to tweak this:
http://docs.oracle.com/javase/1.4.2/docs/api/javax/imageio/ImageWriteParam.html#setCompressionQuality%28float%29ImageJ (ij.plugin.PNG_Writer) simply does not care about this parameter. You are free to write your own version of PNG_Writer with more compression (I guess that it will be slower, however)...
PNG has also the option of interlacings, which affect file size (usually creating a larger file) - I don't know whether ImageIO (and, hence, ImageJ) uses interlacing for PNG, but I think it doesn't.
Michael
________________________________________________________________
On Mar 27, 2013, at 15:21, Sébastien Tosi wrote:
> Hi all,
>
> I noticed that Matlab PNG image exportation brings up to 20% extra compression as compared to ImageJ. Are there different possible compression schemes in the PNG standard?
>
> Best,
> Sébastien
--
ImageJ mailing list:
http://imagej.nih.gov/ij/list.html