Skip to content

Commit

Permalink
PNG compression filters range from 0-5
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Mar 9, 2023
1 parent b396ff0 commit 7b955d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/png.c
Original file line number Diff line number Diff line change
Expand Up @@ -12397,7 +12397,7 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info,Image *image)
*/

mng_info->write_png_compression_filter = StringToUnsignedLong(value)+1;
if (mng_info->write_png_compression_filter > 10)
if (mng_info->write_png_compression_filter > 5)
(void) ThrowMagickException(&image->exception,
GetMagickModule(),CoderWarning,
"ignoring invalid defined png:compression-filter",
Expand Down

0 comments on commit 7b955d7

Please sign in to comment.