[devel] Updated documentation on setting non-IDAT zlib compression parameters

This commit is contained in:
Glenn Randers-Pehrson 2011-04-01 15:31:26 -05:00
parent c683100e31
commit a45f47c225
2 changed files with 12 additions and 6 deletions

View File

@ -2295,11 +2295,11 @@ with zlib) for details on the compression levels.
#include zlib.h #include zlib.h
/* set the zlib compression level */ /* Set the zlib compression level */
png_set_compression_level(png_ptr, png_set_compression_level(png_ptr,
Z_BEST_COMPRESSION); Z_BEST_COMPRESSION);
/* set other zlib parameters */ /* Set other zlib parameters for compressing IDAT */
png_set_compression_mem_level(png_ptr, 8); png_set_compression_mem_level(png_ptr, 8);
png_set_compression_strategy(png_ptr, png_set_compression_strategy(png_ptr,
Z_DEFAULT_STRATEGY); Z_DEFAULT_STRATEGY);
@ -2307,7 +2307,10 @@ with zlib) for details on the compression levels.
png_set_compression_method(png_ptr, 8); png_set_compression_method(png_ptr, 8);
png_set_compression_buffer_size(png_ptr, 8192) png_set_compression_buffer_size(png_ptr, 8192)
/* set zlib parameters for text compression */ /* Set zlib parameters for text compression
* If you don't call these, the parameters
* fall back on those defined for IDAT chunks
*/
png_set_text_compression_mem_level(png_ptr, 8); png_set_text_compression_mem_level(png_ptr, 8);
png_set_text_compression_strategy(png_ptr, png_set_text_compression_strategy(png_ptr,
Z_DEFAULT_STRATEGY); Z_DEFAULT_STRATEGY);

View File

@ -3238,11 +3238,11 @@ with zlib) for details on the compression levels.
#include zlib.h #include zlib.h
/* set the zlib compression level */ /* Set the zlib compression level */
png_set_compression_level(png_ptr, png_set_compression_level(png_ptr,
Z_BEST_COMPRESSION); Z_BEST_COMPRESSION);
/* set other zlib parameters */ /* Set other zlib parameters for compressing IDAT */
png_set_compression_mem_level(png_ptr, 8); png_set_compression_mem_level(png_ptr, 8);
png_set_compression_strategy(png_ptr, png_set_compression_strategy(png_ptr,
Z_DEFAULT_STRATEGY); Z_DEFAULT_STRATEGY);
@ -3250,7 +3250,10 @@ with zlib) for details on the compression levels.
png_set_compression_method(png_ptr, 8); png_set_compression_method(png_ptr, 8);
png_set_compression_buffer_size(png_ptr, 8192) png_set_compression_buffer_size(png_ptr, 8192)
/* set zlib parameters for text compression */ /* Set zlib parameters for text compression
* If you don't call these, the parameters
* fall back on those defined for IDAT chunks
*/
png_set_text_compression_mem_level(png_ptr, 8); png_set_text_compression_mem_level(png_ptr, 8);
png_set_text_compression_strategy(png_ptr, png_set_text_compression_strategy(png_ptr,
Z_DEFAULT_STRATEGY); Z_DEFAULT_STRATEGY);