Page 1 of 1

PerlMagick Annotate Rotate text

Posted: 2015-06-16T02:56:30-07:00
by myicq
I have (FINALLY) found out how to rotate text in PerlMagick.

But the logic does not match what I expected.

First : version = ImageMagick 6.9.1-2 Q16 x86 2015-04-14 http://www.imagemagick.org

My goal is to write text vertically rotated 90 degrees clockwise.

I kind of expected the syntax to be this:

Code: Select all

$r = $image->Annotate(
            text=>'MyText',
            geometry=>90x90+0+200,
            font=>'arial.ttf',
            fill=>'black',
            gravity=>'northwest',
            pointsize=>20
            );
But that did not rotate text !! No matter what value of 90x90 or 45x45, as per examples in documents.

It was not until I tried rotate parameter.

Code: Select all

$r = $image->Annotate(
            text=>'MyText',
            geometry=>90x90+0+200,
            font=>'arial.ttf',
            fill=>'black',
            gravity=>'northwest',
            rotate=>90,         # <<<<<<< NOTICE THIS <<<<<<<<
            pointsize=>20
            );
Is this explained ANYWHERE ? All documentation / examples show I have to use geometry. No mention of rotate.

It works for me now, but really could use some documentation links here with examples.

Re: PerlMagick Annotate Rotate text

Posted: 2015-06-16T03:21:02-07:00
by snibgo
On http://www.imagemagick.org/script/perl-magick.php , under "Annotate", one of the listed parameters is "rotate".