1 diff --git a/pngwutil.c b/pngwutil.c
4 @@ -336,8 +336,10 @@ png_deflate_claim(png_structrp png_ptr,
5 if ((png_ptr->flags & PNG_FLAG_ZLIB_CUSTOM_STRATEGY) != 0)
6 strategy = png_ptr->zlib_strategy;
8 +#ifdef PNG_WRITE_FILTER_SUPPORTED
9 else if (png_ptr->do_filter != PNG_FILTER_NONE)
10 strategy = PNG_Z_DEFAULT_STRATEGY;
14 strategy = PNG_Z_DEFAULT_NOFILTER_STRATEGY;
15 @@ -823,12 +825,16 @@ png_write_IHDR(png_structrp png_ptr, png
17 if ((png_ptr->do_filter) == PNG_NO_FILTERS)
19 +#ifdef PNG_WRITE_FILTER_SUPPORTED
20 if (png_ptr->color_type == PNG_COLOR_TYPE_PALETTE ||
21 png_ptr->bit_depth < 8)
22 png_ptr->do_filter = PNG_FILTER_NONE;
25 png_ptr->do_filter = PNG_ALL_FILTERS;
27 + png_ptr->do_filter = PNG_FILTER_NONE;
31 png_ptr->mode = PNG_HAVE_IHDR; /* not READY_FOR_ZTXT */