diff --git a/ANNOUNCE b/ANNOUNCE index b1edea33b..70ce1e4e0 100644 --- a/ANNOUNCE +++ b/ANNOUNCE @@ -704,6 +704,7 @@ Version 1.7.0beta48 [February 7, 2015] Version 1.7.0beta49 [February 10, 2015] Combined sub_row, up_row, avg_row, and paeth_row buffers into a single try_row buffer. + Added PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED macro, on by default. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/CHANGES b/CHANGES index 3b22bdb89..b46bea1c0 100644 --- a/CHANGES +++ b/CHANGES @@ -4993,6 +4993,7 @@ Version 1.7.0beta48 [February 7, 2015] Version 1.7.0beta49 [February 10, 2015] Combined sub_row, up_row, avg_row, and paeth_row buffers into a single try_row buffer. + Added PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED macro, on by default. Send comments/corrections/commendations to png-mng-implement at lists.sf.net (subscription required; visit diff --git a/png.h b/png.h index 875f34db6..26d6447d2 100644 --- a/png.h +++ b/png.h @@ -1748,6 +1748,7 @@ PNG_FIXED_EXPORT(209, void, png_set_filter_heuristics_fixed, * for PNG images, and do considerably fewer caclulations. In the future, * these values may not correspond directly to the zlib compression levels. */ +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED PNG_EXPORT(69, void, png_set_compression_level, (png_structrp png_ptr, int level)); @@ -1765,6 +1766,7 @@ PNG_EXPORT(72, void, png_set_compression_window_bits, (png_structrp png_ptr, PNG_EXPORT(73, void, png_set_compression_method, (png_structrp png_ptr, int method)); +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED /* Also set zlib parameters for compressing non-IDAT chunks */ diff --git a/pngwrite.c b/pngwrite.c index 248e638fe..9ede3cdea 100644 --- a/pngwrite.c +++ b/pngwrite.c @@ -1348,6 +1348,7 @@ png_set_filter_heuristics_fixed(png_structrp png_ptr, int heuristic_method, #endif /* FIXED_POINT */ #endif /* WRITE_WEIGHTED_FILTER */ +#ifdef PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED void PNGAPI png_set_compression_level(png_structrp png_ptr, int level) { @@ -1430,6 +1431,7 @@ png_set_compression_method(png_structrp png_ptr, int method) png_ptr->zlib_method = method; } +#endif /* WRITE_CUSTOMIZE_COMPRESSION */ /* The following were added to libpng-1.5.4 */ #ifdef PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED diff --git a/scripts/pnglibconf.dfa b/scripts/pnglibconf.dfa index f874fc9a8..027a8b561 100644 --- a/scripts/pnglibconf.dfa +++ b/scripts/pnglibconf.dfa @@ -542,6 +542,7 @@ option USER_TRANSFORM_INFO if READ_USER_TRANSFORM, WRITE_USER_TRANSFORM # non-IDAT chunks (zTXt, iTXt, iCCP, and unknown chunks). This feature # was added at libpng-1.5.3. option WRITE_CUSTOMIZE_ZTXT_COMPRESSION requires WRITE +option WRITE_CUSTOMIZE_COMPRESSION requires WRITE # Any chunks you are not interested in, you can undef here. The # ones that allocate memory may be expecially important (hIST, diff --git a/scripts/pnglibconf.h.prebuilt b/scripts/pnglibconf.h.prebuilt index 5f49f74f6..e016b1f77 100644 --- a/scripts/pnglibconf.h.prebuilt +++ b/scripts/pnglibconf.h.prebuilt @@ -2,7 +2,7 @@ /* pnglibconf.h - library build configuration */ -/* Libpng version 1.7.0beta49 - February 7, 2015 */ +/* Libpng version 1.7.0beta49 - February 10, 2015 */ /* Copyright (c) 1998-2014 Glenn Randers-Pehrson */ @@ -126,6 +126,7 @@ #define PNG_WRITE_BGR_SUPPORTED #define PNG_WRITE_CHECK_FOR_INVALID_INDEX_SUPPORTED #define PNG_WRITE_COMPRESSED_TEXT_SUPPORTED +#define PNG_WRITE_CUSTOMIZE_COMPRESSION_SUPPORTED #define PNG_WRITE_CUSTOMIZE_ZTXT_COMPRESSION_SUPPORTED #define PNG_WRITE_FILLER_SUPPORTED #define PNG_WRITE_FILTER_SUPPORTED