The following code doesn't crash or give any warnings, but the red text should be translated 10px down and to the right of the black text, and it isn't:
Code: Select all
#!/usr/bin/perl
use strict;
use Image::Magick;
my $img = Image::Magick->new;
$img->Set(size=>"200x100");
$img->Read("xc:white");
$img->Annotate(
text=>"testing 1 2 3",
pointsize=>24,
fill=>"black",
antialias=>"true",
x=>100,
y=>50,
align=>"Center"
);
$img->Annotate(
text=>"testing 1 2 3",
pointsize=>24,
fill=>"red",
antialias=>"true",
x=>100,
y=>50,
translate=>"10,10",
align=>"Center"
);
binmode STDOUT;
$img->Write("PNG24:foo.png");