Page 1 of 1

Need help Annotating

Posted: 2007-10-04T07:34:14-07:00
by zombie_nation
Hi guys,

I have managed to create my script to do the following:
upload an image from user
take input text
create a canvas of required width and height (px) at correct density
resize uploaded image and composite
composite the annotated text onto the image
thumbnail the image
and store everything in appropraite directories....

And when I installed and ran the script on my server it .. failed.
The image was created but no text was written on the image.

I tried the following simple command:
/usr/bin/montage -geometry +0+0 -background skyblue -label "Faerie Dragon" /home/mysports/public_html/images/cards/samples/text.jpg /home/mysports/public_html/images/cards/samples/text.jpg

but even this did not work - the sample image is at http://www.mysportscards.org/images/car ... s/text.jpg.
I ran the command using ssh and got the following error:
montage: unable to read font `(null)'

Can anyone point me in the right direction?

Re: Need help Annotating

Posted: 2007-10-04T07:42:25-07:00
by Bonzo
I would guess there is something wrong with your instal and ImageMagick can not find a default font. Try adding the path to a known font and see if that works e.g.

Code: Select all

exec("/usr/bin/convert -size 236x130 xc:lightblue -fill black -font verdana.ttf -pointsize 25 -gravity NorthWest -annotate +0+0 \"The quick red fox jumped over the lazy brown dog.\" annotate1.jpg");
This is linking to a verdana.ttf uploaded to the same folder as the code.