October 1st, 2002, 08:15 AM
Imagemagick: How to get the width of annotated text?
I'm trying to place som CopyRight information in the bottom right corner of an image using ImageMagick. I'm almost there, but still I'm not satisfied.
This is what I've figured out so far:
convert (...) -draw "text -150,-5 'My © Name'" sourcefile.jpg destfile.jpg
If I know the width of the text, I'm able to place the text 5 px from the bottom right corner ( in both directions)
I'm using a PHP script to retreive the copyright information from a database, hence I don't know how wide the text is.
Is it possible to determine the text width, or is there another way to make sure that the bottom right corner of the text is placed 5 px from the bottom right corner of the image?