From 201f0c995969c480e7cf0285e5826c4c6903b7a1 Mon Sep 17 00:00:00 2001 From: glennrp Date: Sat, 28 Jun 2014 16:13:49 +0000 Subject: [PATCH] Don't let libpng16 check the ICC/sRGB profile; we do that ourselves anyway. --- coders/png.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/coders/png.c b/coders/png.c index ffe8b0ee4..9463abe68 100644 --- a/coders/png.c +++ b/coders/png.c @@ -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 -- 2.50.1