ImageMagick doesn't store error messages in $! (but you knew that).
#!/usr/bin/perl
use warnings;
use strict;
use strict;
use warnings;
use Image::Magick;
my $label = Image::Magick->new(
size => "600x600",
);
$label->Read("xc:white");
$label->Draw(
primitive => 'line',
points => "300,100 300,500",
stroke => '#600',
);
$label->Draw(
primitive => 'line',
points => "100,300 500,300",
stroke => '#600',
);
$label->Draw(
primitive => 'rectangle',
points => "100,100 500,500",
fill => 'none',
stroke => '#600',
);
my $x = $label->Annotate(
text => "North West",
# 'x' => 150,
# 'y' => 150,
pointsize => 40,
fill => 'green',
# font => 'Flubber.ttf',
font => $ENV{WINDIR}.'\\Fonts\\Flubber.ttf',
);
warn "$x" if "$x";
$x = $label->Blur(sigma =>1);
warn "$x" if "$x";
$x = $label->Write(__FILE__.".png");
warn "$x" if "$x";
__END__
update: Remember me saying how you need to specify x,y? See how it's comment it out? Think about it for a second.
| MJD says "you can't just make shit up and expect the computer to know what you mean, retardo!" | | I run a Win32 PPM repository for perl 5.6.x and 5.8.x -- I take requests (README). | | ** The third rule of perl club is a statement of fact: pod is sexy. |
|