mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
Write compression options
More sophisticated defaulting which helps significantly for some files along with code to make it easier to control the compression defaults and to make the settings honor the API calls the application makes (previously low windowBits settings would get reset to higher values.) Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -304,9 +304,10 @@ setting EXTENSION_HEADER
|
||||
# The '@' here means to substitute the value when pnglibconf.h is built
|
||||
setting ZLIB_VERNUM default @ZLIB_VERNUM
|
||||
setting Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
|
||||
# TODO: why aren't these Z_RLE; zlib.h says that Z_RLE, specifically, is
|
||||
# appropriate for PNG images, maybe it doesn't exist in all versions?
|
||||
setting Z_DEFAULT_STRATEGY default @Z_FILTERED
|
||||
# By experiment even if other strategies are favored over the zlib default it
|
||||
# still comes out best for 47% of files tested; more than filtered, the next
|
||||
# best, for 38.8% of files tested.
|
||||
setting Z_DEFAULT_STRATEGY default @Z_DEFAULT_STRATEGY
|
||||
setting Z_DEFAULT_NOFILTER_STRATEGY default @Z_DEFAULT_STRATEGY
|
||||
|
||||
setting TEXT_Z_DEFAULT_COMPRESSION default @Z_DEFAULT_COMPRESSION
|
||||
|
||||
@@ -213,7 +213,7 @@
|
||||
#define PNG_ZLIB_VERNUM 0
|
||||
#define PNG_Z_DEFAULT_COMPRESSION (-1)
|
||||
#define PNG_Z_DEFAULT_NOFILTER_STRATEGY 0
|
||||
#define PNG_Z_DEFAULT_STRATEGY 1
|
||||
#define PNG_Z_DEFAULT_STRATEGY 0
|
||||
#define PNG_sCAL_PRECISION 5
|
||||
#define PNG_sRGB_PROFILE_CHECKS 2
|
||||
/* end of settings */
|
||||
|
||||
Reference in New Issue
Block a user