]> granicus.if.org Git - imagemagick/commitdiff
(no commit message)
authorcristy <urban-warrior@git.imagemagick.org>
Tue, 20 Mar 2012 19:28:35 +0000 (19:28 +0000)
committercristy <urban-warrior@git.imagemagick.org>
Tue, 20 Mar 2012 19:28:35 +0000 (19:28 +0000)
MagickCore/utility.c
coders/caption.c
coders/pango.c

index 634a40d816cf9e3665b88919586ed47615e15439..ebc43915a942301c05b1043747b7e98e59362264 100644 (file)
@@ -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 != '@'))
index fd00f8ae2c420b01d3602cb8f13099c4fcaa2313..96bd543dd9dc00b5cadc5ada383f7bebd1e149be 100644 (file)
@@ -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,
index 4fd33f8779d4965e550352a2fafd9d95673fe290..9d816f0f8a1f2e8527f5168da96416383e5713d1 100644 (file)
@@ -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);