mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Palette index checking: checking on read was erroneously skipped. pngcp can now turn off the palette index checking or fix the errors (mainly to allow comparison with libpng 1.6, which defaulted to ignoring it). The API now documents how the 'enabled' parameter works. On read the check is on by default (it was apparently off in libpng 1.6) however now if explicitly turned on the warning message is stopped, this provides better interaction with get_palette_max at the cost of a small API change (may need to be reviewed.) Palette size errors: invalid entries in the palette are now set to #beaded to make the errors more obvious and allow easy detection in memory. Read transform pipeline caching: changes to fix the palette index check (which are erroneously cached), the pipeline can now contain multiple caches. E.g. caching of packing of palette indices can be combined with caching of palette RGB transforms. Read code now checks for callbacks to read 0 data (and faults them). Fixed the reading of PNGs with multiple 0 length IDATs that failed as a result plus the handling of zero length unknown. (Which occurs, validly; the spurious warning has been removed). filter selection: the 1.6 and earlier sum of absolute differences algorithm has been reintroduced with an option to disfavor some filters over others where the sums are close (not yet exposed). The selection code also logs the last known occurence of each possible byte code across multiple lines. This allows detection of PNG images with lower bit depth than the format implies and, therefore, allows the filtering to be turned off in those cases as well. The default write zlib settings are still lower than libpng16. The selection algorithm is being refined (the overall results are worse than not doing any filtering). Signed-off-by: John Bowler <jbowler@acm.org>
This "contrib" directory contains contributions which are not necessarily under the libpng license, although all are open source. They are not part of libpng proper and are not used for building the library, although some are used for testing the library via "make check".