The stupid question is the question not asked | |
PerlMonks |
Image rotation with GD: counter or clockwise?by Discipulus (Canon) |
on Feb 23, 2021 at 13:29 UTC ( [id://11128690]=perlquestion: print w/replies, xml ) | Need Help?? |
Discipulus has asked for the wisdom of the Perl Monks concerning the following question:
Hello folks! I'm experimenting with images again but I'm stucked at image rotation using GD. Documentation says: > $image->copyRotated($sourceImage,$dstX,$dstY,$srcX,$srcY,$width,$height,$angle) Like copyResized() but the $angle argument specifies an arbitrary amount to rotate the image clockwise (in degrees). In addition, $dstX and $dstY species the center of the destination image, and not the top left corner. The following code seems to rotate counter clockwise instead (pass to the following program a jpg image and optionally a degrees value):
Did you see the same result as me? I see the resulting image rotated 90° counter clockwise (I'd say counter documentwise ;). In early tests I got a warning about older version of gdlib (like: libgd 2.0.33 or higher required for copyRotated ) and I upgraded my GD.pm using cpan client and everything went fine. I currently have: GD version : 2.66 libgd version: 2.2.4 Any insight appreciated. L*
There are no rules, there are no thumbs.. Reinvent the wheel, then learn The Wheel; may be one day you reinvent one of THE WHEELS.
Back to
Seekers of Perl Wisdom
|
|