]> granicus.if.org Git - imagemagick/commitdiff
Don't let libpng16 check the ICC/sRGB profile; we do that ourselves anyway.
authorglennrp <glennrp@git.imagemagick.org>
Sat, 28 Jun 2014 16:13:49 +0000 (16:13 +0000)
committerglennrp <glennrp@git.imagemagick.org>
Sat, 28 Jun 2014 16:13:49 +0000 (16:13 +0000)
coders/png.c

index ffe8b0ee4d81420d4f7c21069ce8ced5b64ebd2a..9463abe68821bf59fab48e3ed14614c128bdc302 100644 (file)
@@ -2410,6 +2410,13 @@ static Image *ReadOnePNGImage(MngInfo *mng_info,
 
        if (value != NULL)
           ping_preserve_iCCP=MagickTrue;
+
+#if defined(PNG_SKIP_sRGB_CHECK_PROFILE) && defined(PNG_SET_OPTION_SUPPORTED)
+       /* Don't let libpng check for ICC/sRGB profile because we're going
+        * to do that anyway.  This feature was added at libpng-1.6.12.
+        */
+       png_set_option(ping, PNG_SKIP_sRGB_CHECK_PROFILE, PNG_OPTION_ON);
+#endif
     }
 #if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED)
     else