mirror of
https://git.code.sf.net/p/libpng/code.git
synced 2025-07-10 18:04:09 +02:00
LOW_MEMORY and COMPAT bug fixes
The LOW_MEMORY PNG_COMPRESSION option should not be setting HUFFMAN_ONLY or using a low deflate 'level'; according to the comments in zconf.h only windowBits and memLevel affect the memory. pngwutil.c has been changed to use the same values as HIGH compression. The COMPAT option turned on the old optimize_cmf code (now in fix_cinfo), however there was a serious bug in that code; it put the wrong value in z_cmf. The setting was also not handled correctly in pz_compression_settings. pngtest now verifies the operation of COMPAT and, as a result, pngtest.png has been reverted to the libpng 1.6 (etc) version. IDAT size handling has been improved; if not explicitly set values appropriate to png_level are now chosen (in addition to the handling for the COMPAT setting). HIGH and HIGH_READ_SPEED now create unlimited size IDAT chunks, which requires buffering the whole of the IDAT data in memory but reflects what other programs and optimizers do. Signed-off-by: John Bowler <jbowler@acm.org>
This commit is contained in:
@@ -779,8 +779,12 @@ setting sCAL_PRECISION default 5
|
||||
# written IDAT chunks. It can be any (zlib) uInt value, however this amount of
|
||||
# data has to be buffered on write so it is recommended that a smaller size be
|
||||
# used unless saving the 12-byte chunk overhead is necessary.
|
||||
#
|
||||
# If not set libpng uses the DEFAULT_COMPRESSION_LEVEL setting to determine
|
||||
# something appropriate. The value below is only used for 'MEDIUM' compression
|
||||
# (which is the default: see below.)
|
||||
|
||||
setting ZBUF_SIZE default 4096
|
||||
setting ZBUF_SIZE default 8192
|
||||
|
||||
# This is the size of the decompression buffer used when counting or checking
|
||||
# the decompressed size of an LZ stream from a compressed ancilliary chunk; the
|
||||
|
||||
Reference in New Issue
Block a user