While looking into why round-tripping a small PNG image through PIL expanded the file size noticeable (several hundred % for very small images), I isolated it to the explict flushing of the zlib compression engine during zip encoding (via Z_SYNC_FLUSH), resulting in much less efficiency in compression in some cases.
There's a FIXME comment in the source from 990709 indicating that it's a workaround for a problem with recent (presumably as of that date) versions of zlib. Would anyone happen to have further information on the bug that it's working around and whether or not that's still necessary? I found some e-mails in the archives from that timeframe but not much concrete information. The sample files on a web site showing the problem at the time are, not surprisingly, no longer available. It's true that it hurts most on small images, especially those in the Ks to 10Ks, but even larger images grow 5-10%, so if it's something that might be removable (or perhaps conditional on a save option) it might help. Thanks. -- David _______________________________________________ Image-SIG maillist - [email protected] http://mail.python.org/mailman/listinfo/image-sig
