Rotate around center - Distort SRT
Posted: 2013-04-02T22:47:05-07:00
Hello:
I'm trying to get a arrow png to rotate to a direction around the center.
I tried rotate, but that seems to rotate around the corner.
I have found talk about using Distort SRT instead, but there seem to be no good Perl examples for use.
I tried this:
In which Perls 'use strict' had a hissy about:
So anyone have any ideas on how this is supposed to work in perl?
Is there anyplace with better documentation for using Image::Magick in perl then here? There doesn't really seem to be any good documentation or resources around for using IM in perl unfortunately.
Any help is greatly appreciated.
Thanks!
John
I'm trying to get a arrow png to rotate to a direction around the center.
I tried rotate, but that seems to rotate around the corner.
I have found talk about using Distort SRT instead, but there seem to be no good Perl examples for use.
I tried this:
Code: Select all
my $windicon = Image::Magick->new;
$windicon->Read(filename => "/arrows/arrow-white2.png");
$windicon->Set(background => 'transparent');
$windicon->Distort(virtual-pixel=>'transparent', method=>'ScaleRotateTranslate', $windBearing);
Code: Select all
Bareword "virtual" not allowed while "strict subs" in use
Is there anyplace with better documentation for using Image::Magick in perl then here? There doesn't really seem to be any good documentation or resources around for using IM in perl unfortunately.
Any help is greatly appreciated.
Thanks!
John