Skip to content

Commit

Permalink
support svg:embedding define
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristy committed Dec 26, 2024
1 parent cbd9f22 commit 3afd169
Showing 1 changed file with 18 additions and 10 deletions.
28 changes: 18 additions & 10 deletions magick/draw.c
Original file line number Diff line number Diff line change
Expand Up @@ -5541,8 +5541,8 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
else
if (*primitive_info->text != '\0')
{
const MagickInfo
*magick_info;
const char
*option;

MagickStatusType
path_status;
Expand All @@ -5556,15 +5556,23 @@ MagickExport MagickBooleanType DrawPrimitive(Image *image,
(void) CopyMagickString(clone_info->filename,primitive_info->text,
MagickPathExtent);
(void) SetImageInfo(clone_info,1,exception);
magick_info=GetMagickInfo(clone_info->magick,exception);
if ((magick_info != (const MagickInfo*) NULL) &&
(LocaleCompare(magick_info->magick_module,"SVG") == 0))
option=GetImageOption(clone_info,"svg:embedding");
if ((option == (char *) NULL) &&
(IsStringTrue(option) == MagickFalse))
{
(void) ThrowMagickException(exception,GetMagickModule(),
CorruptImageError,"ImageTypeNotSupported","`%s'",
clone_info->filename);
clone_info=DestroyImageInfo(clone_info);
break;
const MagickInfo
*magick_info;

magick_info=GetMagickInfo(clone_info->magick,exception);
if ((magick_info != (const MagickInfo*) NULL) &&
(LocaleCompare(magick_info->magick_module,"SVG") == 0))
{
(void) ThrowMagickException(exception,GetMagickModule(),
CorruptImageError,"ImageTypeNotSupported","`%s'",
clone_info->filename);
clone_info=DestroyImageInfo(clone_info);
break;
}
}
(void) CopyMagickString(clone_info->filename,primitive_info->text,
MagickPathExtent);
Expand Down

0 comments on commit 3afd169

Please sign in to comment.