From a45f47c225cc6d2251a751e0030ca925f0aa7e3c Mon Sep 17 00:00:00 2001 From: Glenn Randers-Pehrson Date: Fri, 1 Apr 2011 15:31:26 -0500 Subject: [PATCH] [devel] Updated documentation on setting non-IDAT zlib compression parameters --- libpng-manual.txt | 9 ++++++--- libpng.3 | 9 ++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/libpng-manual.txt b/libpng-manual.txt index d19ac94e8..b19f099c8 100644 --- a/libpng-manual.txt +++ b/libpng-manual.txt @@ -2295,11 +2295,11 @@ with zlib) for details on the compression levels. #include zlib.h - /* set the zlib compression level */ + /* Set the zlib compression level */ png_set_compression_level(png_ptr, 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_strategy(png_ptr, 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_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_strategy(png_ptr, Z_DEFAULT_STRATEGY); diff --git a/libpng.3 b/libpng.3 index 98ad76e21..409ae291b 100644 --- a/libpng.3 +++ b/libpng.3 @@ -3238,11 +3238,11 @@ with zlib) for details on the compression levels. #include zlib.h - /* set the zlib compression level */ + /* Set the zlib compression level */ png_set_compression_level(png_ptr, 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_strategy(png_ptr, 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_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_strategy(png_ptr, Z_DEFAULT_STRATEGY);