[magick-users] Locating end of a text (perl magick)

Benoit VARVENNE varvenne at genoway.com
Tue Dec 2 09:08:18 PST 2008


Hello,

I'm a quite new Image Magick user and I wish to locate ending position of a
text on the image (text annotated through "Annotate" method).
                $image->Annotate(
                x         => $X,
                y         => $Y,
               font      => 'arial.ttf',
               pointsize => $fontSize,
               undercolor => "white",
               skewX     => 0,
               skewY     => 0,
               fill      => 'black',
               text      => $myText
           );
What I wish to obtain is something like :
     It's beginning position ($X) + length_of_text*fontSize
    == ending pixel on the image  ???
The above formula does not work and I'm not really used to such text
manipulation.

Can someone help me ?

Thanks a lot
Benoît




More information about the Magick-users mailing list