From: glennrp Date: Tue, 29 May 2012 19:13:52 +0000 (+0000) Subject: Ignore APNG chunks even when libpng was built with the "APNG patch". X-Git-Tag: 7.0.1-0~5516 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=629960f505ebba710ec9b6953a539a21dab176f2;p=imagemagick Ignore APNG chunks even when libpng was built with the "APNG patch". --- diff --git a/coders/png.c b/coders/png.c index d374ec322..53a769800 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2094,7 +2094,7 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, ssize_t j; -#if defined(PNG_UNKNOWN_CHUNKS_SUPPORTED) +#ifdef PNG_UNKNOWN_CHUNKS_SUPPORTED png_byte unused_chunks[]= { 104, 73, 83, 84, (png_byte) '\0', /* hIST */ @@ -2103,6 +2103,12 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, 115, 67, 65, 76, (png_byte) '\0', /* sCAL */ 115, 80, 76, 84, (png_byte) '\0', /* sPLT */ 116, 73, 77, 69, (png_byte) '\0', /* tIME */ +#ifdef PNG_APNG_SUPPORTED /* libpng was built with APNG patch; */ + /* ignore the APNG chunks */ + 97, 99, 84, 76, (png_byte) '\0', /* acTL */ + 102, 99, 84, 76, (png_byte) '\0', /* fcTL */ + 102, 100, 65, 84, (png_byte) '\0', /* fdAT */ +#endif }; #endif