From: Cristy Date: Wed, 3 Apr 2019 12:06:20 +0000 (-0400) Subject: ... X-Git-Tag: 7.0.8-37~3 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=284dbe28b9d9b6e98a8052dd2860ec7605dfc6be;p=imagemagick ... --- diff --git a/coders/magick.c b/coders/magick.c index e113fb5ae..24ecc9ea0 100644 --- a/coders/magick.c +++ b/coders/magick.c @@ -13254,24 +13254,26 @@ static MagickBooleanType WriteMAGICKImage(const ImageInfo *image_info, if (magick_image == (Image *) NULL) ThrowWriterException(ResourceLimitError,exception->reason); write_info=CloneImageInfo(image_info); - - /* Set output format */ + /* + Set output format. + */ *write_info->filename='\0'; value=GetImageOption(image_info,"h:format"); if (value == (char *) NULL) value=GetImageOption(image_info,"magick:format"); - if ((value == (char *) NULL) || (IsOptionMember("H",value) != MagickFalse) || (IsOptionMember("MAGICK",value) != MagickFalse)) - { /* Use default GIF or PNM */ + { + /* + Use default GIF or PNM. + */ if (magick_image->storage_class == DirectClass) (void) CopyMagickString(write_info->magick,"PNM",MagickPathExtent); else (void) CopyMagickString(write_info->magick,"GIF",MagickPathExtent); } - else /* Use the requested format */ - (void) CopyMagickString(write_info->magick,value,MagickPathExtent); - + else + (void) CopyMagickString(write_info->magick,value,MagickPathExtent); /* use the requested format */ blob=ImageToBlob(write_info,magick_image,&length,exception); magick_image=DestroyImage(magick_image); if (blob == (void *) NULL) @@ -13288,7 +13290,7 @@ static MagickBooleanType WriteMAGICKImage(const ImageInfo *image_info, } (void) WriteBlobString(image,"/*\n"); (void) FormatLocaleString(buffer,MagickPathExtent," %s (%s).\n", - image->filename, write_info->magick); + image->filename,write_info->magick); (void) DestroyImageInfo(write_info); (void) WriteBlobString(image,buffer); (void) WriteBlobString(image,"*/\n");