imagemagickosx-lionpango

Error when trying to use pango with imagemagick on OSX


I am wanting to use imagemagick to add watermarks to photographs. I am using OSX and Python scripts for the code and was trying the code from (http://www.imagemagick.org/Usage/text/#pango_markup) currently I am struggling to understand why I can't get the images to appear.

serinitus:nppPhotos ns$ convert -background lightblue -gravity center -size 180x \
>           pango:"The <b>bold</b> and <i>beautiful</i>" \
>           pango_formatting.gif
convert: unable to open image `The <b>bold</b> and <i>beautiful</i>': No such file or directory @ error/blob.c/OpenBlob/2658.
convert: no decode delegate for this image format `PANGO' @ error/constitute.c/ReadImage/501.
convert: no images defined `pango_formatting.gif' @error/convert.c/ConvertImageCommand/3187.
serinitus:nppPhotos ns$   

Installed versions are ImageMagick 6.8.9-7 Q16 x86_64 2014-09-14 and pango-1.36.7 via homebrew.

I have tried re-installing ImageMagick with the --with-pango flag.

I'm down to one of two options: I'm missing something really obvious with the command line (even thought I copied/pasted it in), or there is a config error with the way that brew is installing imagemagick on OSX Lion.


Solution

  • It looks to me as though Pango is not installed. Either of the following two commands will tell you if ImageMagick is aware of Pango:

    convert -list format
    identify -list format
    

    Output:

    Format  Module    Mode  Description
    -------------------------------------------------------------------------------
      3FR  DNG       r--   Hasselblad CFV/H3D39II
      AAI* AAI       rw+   AAI Dune image
       AI  PDF       rw-   Adobe Illustrator CS2
      ART* ART       rw-   PFS: 1st Publisher Clip Art
      ARW  DNG       r--   Sony Alpha Raw Image Format
      AVI  MPEG      r--   Microsoft Audio/Visual Interleaved
      AVS* AVS       rw+   AVS X image
      BGR* BGR       rw+   Raw blue, green, and red samples
     BGRA* BGR       rw+   Raw blue, green, red, and alpha samples
      BMP* BMP       rw-   Microsoft Windows bitmap image
      ...
      PAM* PNM       rw+   Common 2-dimensional bitmap format
    PANGO* PANGO     ---   Pango Markup Language
    

    Or, if you dislike looking through lists:

    identify -list format | grep -Ei "Description|pango"
    
    Format  Module    Mode  Description
     PANGO* PANGO     ---   Pango Markup Language
    

    You are looking for an r for read and a w for write in the column headed Mode. As you can see, nor do I have Pango :-)