[libpng16] Made default Zlib compression settings be configurable. This adds #defines to

pnglibconf.h to control the defaults.
This commit is contained in:
John Bowler
2012-12-20 22:26:18 -06:00
committed by Glenn Randers-Pehrson
parent 5362c9d5e5
commit 24639a63ce
6 changed files with 39 additions and 10 deletions

View File

@@ -182,6 +182,22 @@ setting PREFIX
setting DEFAULT_READ_MACROS default 1
# These settings configure the default compression level (0-9) and 'strategy';
# strategy is as defined by the implementors of zlib, it describes the input
# data and modifies the zlib parameters in an attempt to optimize the balance
# between search and huffman encoding in the zlib algorithms. The defaults are
# the zlib.h defaults - the apparently recursive definition does not arise
# because the name of the setting is prefixed by PNG_
#
# The TEXT values are the defaults when writing compressed text (all forms)
setting Z_DEFAULT_COMPRESSION default Z_DEFAULT_COMPRESSION
setting Z_DEFAULT_STRATEGY default Z_FILTERED
setting Z_DEFAULT_NOFILTER_STRATEGY default Z_DEFAULT_STRATEGY
setting TEXT_Z_DEFAULT_COMPRESSION default Z_DEFAULT_COMPRESSION
setting TEXT_Z_DEFAULT_STRATEGY default Z_DEFAULT_STRATEGY
# The alternative is to call functions to read PNG values, if
# the functions are turned *off* the read macros must always
# be enabled, so turning this off will actually force the

View File

@@ -3,7 +3,7 @@
/* pnglibconf.h - library build configuration */
/* Libpng 1.6.0beta35 - December 19, 2012 */
/* Libpng 1.6.0beta35 - December 21, 2012 */
/* Copyright (c) 1998-2012 Glenn Randers-Pehrson */
@@ -34,8 +34,13 @@
#define PNG_QUANTIZE_RED_BITS 5
#define PNG_sCAL_PRECISION 5
#define PNG_sRGB_PROFILE_CHECKS 2
#define PNG_TEXT_Z_DEFAULT_COMPRESSION Z_DEFAULT_COMPRESSION
#define PNG_TEXT_Z_DEFAULT_STRATEGY Z_DEFAULT_STRATEGY
#define PNG_WEIGHT_SHIFT 8
#define PNG_ZBUF_SIZE 8192
#define PNG_Z_DEFAULT_COMPRESSION Z_DEFAULT_COMPRESSION
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY Z_DEFAULT_STRATEGY
#define PNG_Z_DEFAULT_STRATEGY Z_FILTERED
/* end of settings */
/* options */
#define PNG_16BIT_SUPPORTED