Skip to content

Commit

Permalink
if the image type is explicit, use the file extension if possible (Im…
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Apr 9, 2023
1 parent 93016da commit cc11b8b
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions magick/image.c
Original file line number Diff line number Diff line change
Expand Up @@ -2914,6 +2914,9 @@ MagickExport MagickBooleanType SetImageInfo(ImageInfo *image_info,
{
(void) CopyMagickString(magic,image_info->magick,MaxTextExtent);
magick_info=GetMagickInfo(magic,sans_exception);
if ((magick_info != (const MagickInfo *) NULL) &&
(magick_info->format_type == ExplicitFormatType))
image_info->affirm=MagickTrue;
if (frames == 0)
GetPathComponent(image_info->filename,CanonicalPath,filename);
else
Expand Down

0 comments on commit cc11b8b

Please sign in to comment.