mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00

PNG compression level setting API: this allows the various compression settings controlling deflate, fitlering, and so on to be set via a single setting with six values. This is currently documented in png.h ("Write compression settings"). Internally the compression settings have been tuned both for the overall setting and for any specific settings made by the original APIs. APIs to control iCCP chunk compression separately have been added. contrib/examples/pngcp.c has been modified to accomodate the new compression setting and to include options for separate control of iCCP chunk compression. The new ABI, png_setting, has been modified to accomodate a wider range of settings and most of the old compression control ABIs have been replaced by function-like macros with the same API which call png_setting. This is an API check in 1.7.0 for png_setting (alone). png_setting now handles all of png_set_option. This eliminates 19 ABIs at the cost of adding 1 (png_setting). CRC and benign error checking has been updated internally to use bit-fields and the CRC calculation skip when the CRC is not used has been improved slightly to avoid the initialization of the CRC. A new png_setting based API allows more detailed control of benign error/warning messages (this may change, the internal error handling seems too complex.) The ERROR_NUMBERS support has been removed with the intent of implementing proper i18n. The memcpy-size-0 issue in png_push_fill_buffer has been fixed, with an appropriate debug() assert if a fill for 0 bytes occurs. Most PNG_FLAG_ values for png_struct::flags have been eliminated (as a result of the benign error handling changes). Only one remains. 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".