From: dirk Date: Tue, 21 Apr 2015 21:05:39 +0000 (+0000) Subject: Added option to preserve a corrupt image to the png coder. X-Git-Tag: 7.0.1-0~1086 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=057a5d2cf6f95e2fbea1dc2abec0bc9463f77052;p=imagemagick Added option to preserve a corrupt image to the png coder. --- diff --git a/coders/png.c b/coders/png.c index cf8cf8a38..108e84492 100644 --- a/coders/png.c +++ b/coders/png.c @@ -2180,7 +2180,14 @@ static Image *ReadOnePNGImage(MngInfo *mng_info, " exit ReadOnePNGImage() with error."); if (image != (Image *) NULL) - image->columns=0; + { + const char + *option; + + option=GetImageOption(image_info,"png:preserve-corrupt-image"); + if (IsStringTrue(option) == MagickFalse) + image->columns=0; + } return(GetFirstImageInList(image)); }