From bbde9c623693d322b11def52c2fb95d11d08e89b Mon Sep 17 00:00:00 2001 From: glennrp Date: Sat, 27 Oct 2012 14:40:06 +0000 Subject: [PATCH] Only write sRGB chunk if (0.45 <= image->gamma <= 0.46) --- coders/png.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/coders/png.c b/coders/png.c index 6cbfefdb3..085bd90c7 100644 --- a/coders/png.c +++ b/coders/png.c @@ -3835,7 +3835,7 @@ static Image *ReadPNGImage(const ImageInfo *image_info,ExceptionInfo *exception) } if ((IssRGBColorspace(image->colorspace) != MagickFalse) && - (image->gamma == 1.0)) + (image->gamma < .45 || image->gamma > .46)) SetImageColorspace(image,RGBColorspace,exception); if (LocaleCompare(image_info->magick,"PNG24") == 0) -- 2.50.1