]> granicus.if.org Git - imagemagick/commitdiff
Only write sRGB chunk if (0.45 <= image->gamma <= 0.46)
authorglennrp <glennrp@git.imagemagick.org>
Sat, 27 Oct 2012 14:40:06 +0000 (14:40 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Sat, 27 Oct 2012 14:40:06 +0000 (14:40 +0000)
coders/png.c

index 6cbfefdb3f67eef11b34d00e9dcd232a7a482686..085bd90c734641ef8e1dbfb910604b3a2d1dcccd 100644 (file)
@@ -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)