Re: PerlMagick: Transform may not work

ademmler <[email protected]> Thu, 5 Nov 2009 08:44:55 +0100
Newsgroups gmane.comp.video.image-magick.devel
Message-ID <[email protected]>
Dear Anthony,

thx for you advice. I have tried this out but the script stays silent:  
no warnings nor error.
But the image ist still not rotated.

Here is my full testing code:

#!/opt/local/bin/perl -w
use strict;
use Image::Magick;

my $file = $ARGV[0] || die "Missing input file\n";

my $image = Image::Magick->new();
$image->Set(density => '150');
$image->Read($file);

my $w = $image->Distort(method=>'ScaleRotateTranslate', '5');
warn("$w") if $w;
exit if $w =~ /^Exception/;

$image->Write('rot-'. $file);

exit 0;


Am 05.11.2009 um 05:54 schrieb Anthony Thyssen:

> On Wed, 4 Nov 2009 08:54:03 +0100
> ademmler <[email protected]> wrote:
>
> | Hi,
> |
> | sorry but I have to ask again.
> |
> | I have tried Distort to rotate from from center without succsess:
> |
> | $image->Distort(method=>'ScaleRotateTranslate', '5');
> |
> | Alex
> |
> | > | try using the new distort function with the SRT method
> | > See details in
> | >   http://www.imagemagick.org/Usage/distorts/#srt
> | >
> | > and the function in the "demo.pl" of the "demos" perl examples
> | > directory
> | > usally this is installed in
> | >   /usr/share/doc/ImageMagick-perl-*/demo/demo.pl
> | > (search for Distort).  The example is for an 'arc' distort but the
> | > same
> | > principles apply
>
> That should do a center rotate without any image size increase.
>
> If it is not working check the error return...
>
> my $w = $image->Distort(method=>'ScaleRotateTranslate', '5');
> warn("$w")  if $w;
> exit  if $w =~ /^Exception/;
>
>
>  Anthony Thyssen ( System Programmer )    <[email protected]>
> --------------------------------------------------------------------------
>  "Here, you're a zombie!"
>  "That's right, kick a man when he's dead." said Constable Shoe  
> sharply
>                                              -- Terry Pratchett,  
> "Jingo"
> --------------------------------------------------------------------------
>     Anthony's Home is his Castle     http://www.cit.gu.edu.au/ 
> ~anthony/