> Thanks for your messages. I too had prepared a "patch" for pngcrush
> to build on Debian using the libpng and zlib that comes with the
> source but security folks objected for reasons as you have outlined.
> With your permission can I forward these messages to debian-qa and
> the corresponding bug reports on pngcrush?
> optiPNG is going to be packaged for Debian but until it does i'd like
> to make sure that we aren't left without a PNG optimizer so I'll try
> to persuade people to accept this patch.
Speaking of pngcrush patches, I may as well share mine:
http://pobox.com/~newt/code/pngcrush-1.6.0-grr3.dif.gz (64313 bytes)
This is completely unofficial, of course, and it includes not only bug
fixes but also some minor new features and major cosmetic changes (which
are the bulk of the patch, bytewise, and which IMNSHO make the code a
lot easier to navigate and maintain). Perhaps others will find it useful
until Glenn decides what, if anything, he wants to do with it. ;-)
I'll append (my portion of) the full changelog below, but the important
- fixed unknown-chunk handling
- added Z_RLE support (zlib 1.2+ only)
- added IDAT statistics to final summary (formerly filesize-only)
- added utime() support to give output files same timestamps as input files
- added workaround for Linux clock() bug
The last one, in particular, was driving me nuts; it showed up after
as few as 600 two-method, 640x480 files. And Z_RLE is very nice for
bilevel images; it's pretty useless for everything else (though it's
Btw, I have no further changes planned, although I'm still experimenting
with an alternate approach that may be a little faster. That's been
stalled since June, however, so it may be a while yet. :-/
Version 1.6.0-grr3 (built with libpng-1.2.4 and zlib-1.2.3)
Changed HANDLE_CHUNK_* to PNG_HANDLE_CHUNK_* (and defined if necessary).
Added workaround for apparent bug in Linux 2.4.29/glibc 2.3.2 clock().
Version 1.6.0-grr (built with libpng-1.2.4 and zlib-1.1.4pc or zlib-1.2.2)
Moved ChangeLog out of pngcrush.c comments and into a separate file.
Filtered pngcrush.c through "indent -kr" and "expand" for readability.
[HERE THERE BE MANY BYTES]
Moved 550 lines of usage/help/copyright/license/version info to separate
function(s) and cleaned up significantly.
Added some comments for ease of navigation and readability.
Stripped out a bunch of ancient-libpng compatibility stuff.
Defined PNG_UINT_* macros (pngcrush.h for now).
Fixed unknown-chunk handling ("-rem alla" and "-rem gifx" now work).
Created modified version of makefile that supports external zlib.
Added support for methods using Z_RLE zlib strategy (zlib 1.2.x only).
Documented -huffman option in usage screen.
Added IDAT statistics to final per-file summary.
Added utime() support to give output files same timestamps as input files.