From: glennrp Date: Sun, 6 Mar 2011 23:44:16 +0000 (+0000) Subject: Fixed two other instances of throwing exception to image instead if IMimage. X-Git-Tag: 7.0.1-0~8022 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=b04cc6d371dfca667a8de41afeb8c1fca72c571c;p=imagemagick Fixed two other instances of throwing exception to image instead if IMimage. --- diff --git a/coders/png.c b/coders/png.c index 80a3f3345..45427d742 100644 --- a/coders/png.c +++ b/coders/png.c @@ -7776,6 +7776,9 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, (void) CloseBlob(image); image_info=DestroyImageInfo(image_info); image=DestroyImage(image); + (void) ThrowMagickException(&IMimage->exception, + GetMagickModule(),CoderError, + "PNG write has failed","`%s'",IMimage->filename); return(MagickFalse); } /* @@ -8108,9 +8111,9 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, if (image->colors == 0) { /* DO SOMETHING */ - (void) ThrowMagickException(&image->exception, + (void) ThrowMagickException(&IMimage->exception, GetMagickModule(),CoderError, - "image has 0 colors", "`%s'",""); + "image has 0 colors", "`%s'",IMimage->filename); } while ((int) (one << ping_bit_depth) < (ssize_t) image_colors) @@ -9469,9 +9472,9 @@ static MagickBooleanType WriteOnePNGImage(MngInfo *mng_info, } if (mng_info->write_mng && !mng_info->need_fram && ((int) image->dispose == 3)) - (void) ThrowMagickException(&image->exception,GetMagickModule(), + (void) ThrowMagickException(&IMimage->exception,GetMagickModule(), CoderError,"Cannot convert GIF with disposal method 3 to MNG-LC", - "`%s'",image->filename); + "`%s'",IMimage->filename); /* Free PNG resources.