annotate function works on FreeBSD and Ubuntu, not on Centos

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
sputnick

annotate function works on FreeBSD and Ubuntu, not on Centos

Post by sputnick »

Hi! Massive Image Magick fan here! I would not be able to do what I do without Image Magick and I am very grateful for this superb app, and that's why I have a link up to Image Magick from my website to prove it.

I have a slight problem... My script works perfectly fine on Ubuntu (my laptop) and on FreeBSD (my old webhost, aka Powweb). But now I want to migrate to a new server, running CentOS fresh out of the box.

On CentOS, everything else is fine (resizing, cropping, etc) but "annotate" is totally ignored! Because the CentOS server was pretty bare when I found it, I thought it might be because there are no fonts installed, and that was indeed the case. So I uploaded a bunch of fonts, ran fc-cache, and even rebooted, but still...

Symptom: annotate is totally ignored, nothing is annotated on to the pic, and nothing is written into the httpd error log either. I'm stymied!

I thought the Magick.pm version might be old, so I copied the Magick.pm from my Ubuntu laptop to the server... Same result! Nada! Zilch!

Any ideas what's missing? I'm certain it's the environment, but I have no idea what else I should install or do. Here is my line:

Code: Select all

$image->Annotate(font=>'Arial', family=>'sans-serif', style=>'Italic', antialias=>1, weight=>10, pointsize=>12, undercolor=>'#3f567f', gravity=>$wind, fill=>'#b9c3d5', text=>$text);
As you can see pretty straightforward, very simple, nothing fancy, and of course it works like a charm on Ubuntu and FreeBSD.

Any ideas? I've been scratching my head for hours and hours...

# I should note that on FreeBSD the "Italic" bit is ignored...
# I guess Image Magick is like me and likes Ubuntu best! :)
sputnick

Re: annotate function works on FreeBSD and Ubuntu, not on Centos

Post by sputnick »

ok i wasn't using the debug, dumb of me!

here is the error returned:

Exception 415: Postscript delegate failed `/tmp/magick-XXSCJ3oI'

i wonder what this means...
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: annotate function works on FreeBSD and Ubuntu, not on Centos

Post by magick »

ImageMagick prefers to render text with the Freetype delegate library. If its not supported in your version of ImageMagick it relies on Ghostscript to render the text. It looks like one of your ImageMagick installations does not have Freetype support or Ghostscript support.
sputnick

Re: annotate function works on FreeBSD and Ubuntu, not on Centos

Post by sputnick »

Installed ghostscript and it's working. Thanks!
Post Reply