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 3ac92ec commit 1307d32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion coders/png.c
Expand Up @@ -11948,7 +11948,7 @@ static MagickBooleanType WritePNGImage(const ImageInfo *image_info,
*/

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

0 comments on commit 1307d32

Please sign in to comment.