Code: Select all
$img->Annotate(
text=>"testing 1 2 3",
pointsize=>24,
fill=>"red",
antialias=>"true",
x=>250,
y=>250,
transform=>10,10,
align=>"Center",
gravity=>"Center"
);
Code: Select all
$img->Annotate(
text=>"testing 1 2 3",
pointsize=>24,
fill=>"red",
antialias=>"true",
x=>250,
y=>250,
transform=>10,10,
align=>"Center",
gravity=>"Center"
);
Trytransform=>10,10,
As I said above, I tried it with quotes and it didn't work.magick wrote:Trytransform=>10,10,
- translate=>"10,10",
"translate". Sorry, I made a typo in my comment post, but it's "translate" in my actual code.magick wrote:Did you use 'transform' as you wrote or 'translate' which is required?
Does "translate" work for you?magick wrote:Did you use 'transform' as you wrote or 'translate' which is required?
Code: Select all
#!/usr/bin/perl
use Image::Magick;
$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",
gravity=>"Center"
);
$img->Annotate(
text=>"testing 1 2 3",
pointsize=>24,
fill=>"red",
antialias=>"true",
x=>100,
y=>50,
translate=>"10,10",
align=>"Center",
gravity=>"Center"
);
print "Content-Type: image/png;\n\n";
binmode STDOUT;
$img->Write("PNG24:-");