From: cristy Date: Tue, 20 Mar 2012 19:28:35 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~6004 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0732c4dfb1cfe8d208d041a4e0ffb9ebf946593;p=imagemagick --- diff --git a/MagickCore/utility.c b/MagickCore/utility.c index 634a40d81..ebc43915a 100644 --- a/MagickCore/utility.c +++ b/MagickCore/utility.c @@ -768,6 +768,7 @@ MagickExport MagickBooleanType ExpandFilenames(int *number_arguments, GetPathComponent(option,MagickPath,magick); if ((LocaleCompare(magick,"CAPTION") == 0) || (LocaleCompare(magick,"LABEL") == 0) || + (LocaleCompare(magick,"PANGO") == 0) || (LocaleCompare(magick,"VID") == 0)) continue; if ((IsGlob(filename) == MagickFalse) && (*filename != '@')) diff --git a/coders/caption.c b/coders/caption.c index fd00f8ae2..96bd543dd 100644 --- a/coders/caption.c +++ b/coders/caption.c @@ -137,8 +137,6 @@ static Image *ReadCAPTIONImage(const ImageInfo *image_info, /* Format caption. */ - property=InterpretImageProperties(image_info,image,image_info->filename, - exception); option=GetImageOption(image_info,"filename"); if (option == (const char *) NULL) property=InterpretImageProperties(image_info,image,image_info->filename, diff --git a/coders/pango.c b/coders/pango.c index 4fd33f877..9d816f0f8 100644 --- a/coders/pango.c +++ b/coders/pango.c @@ -176,6 +176,21 @@ static Image *ReadPANGOImage(const ImageInfo *image_info, assert(exception->signature == MagickSignature); image=AcquireImage(image_info,exception); (void) ResetImagePage(image,"0x0+0+0"); + /* + Format caption. + */ + option=GetImageOption(image_info,"filename"); + if (option == (const char *) NULL) + property=InterpretImageProperties(image_info,image,image_info->filename, + exception); + else + if (LocaleNCompare(option,"pango:",6) == 0) + property=InterpretImageProperties(image_info,image,option+6,exception); + else + property=InterpretImageProperties(image_info,image,option,exception); + (void) SetImageProperty(image,"caption",property,exception); + property=DestroyString(property); + caption=ConstantString(GetImageProperty(image,"caption",exception)); /* Get context. */ @@ -276,14 +291,6 @@ static Image *ReadPANGOImage(const ImageInfo *image_info, draw_info->pointsize+0.5)); pango_layout_set_font_description(layout,description); pango_font_description_free(description); - property=InterpretImageProperties(image_info,image,image_info->filename, - exception); - (void) SetImageProperty(image,"caption",property,exception); - property=DestroyString(property); - caption=ConstantString(GetImageProperty(image,"caption",exception)); - /* - Render caption. - */ option=GetImageOption(image_info,"pango:markup"); if ((option != (const char *) NULL) && (IsMagickTrue(option) == MagickFalse)) pango_layout_set_text(layout,caption,-1);