From f9fa9c24612a6395bfb0c6796b833fd4c2a3a464 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Sun, 4 Nov 2012 06:58:25 -0500 Subject: [PATCH] Add support for missing user ability to set Z_FIXED zlib strategy --- CHANGELOG.md | 2 ++ src/image_util.cpp | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 73f77691e..e64aec429 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,8 @@ For a complete change history, see the git log. ## Future +- Added support for setting zlib `Z_FIXED` strategy with format string: `png:z=fixed` + - Fixed handling of transparency level option in Octree-based PNG encoding (#1556) - Faster rendering of rasters by reducing memory allocation of temporary buffers (#1516) diff --git a/src/image_util.cpp b/src/image_util.cpp index 623cf267d..53824e462 100644 --- a/src/image_util.cpp +++ b/src/image_util.cpp @@ -198,6 +198,10 @@ void handle_png_options(std::string const& type, { *strategy = Z_RLE; } + else if (s == "fixed") + { + *strategy = Z_FIXED; + } else { throw ImageWriterException("invalid compression strategy parameter: " + s);