Page 1 of 1

PerlMagick: Annotate doesn't translate

Posted: 2008-05-27T21:30:19-07:00
by Ryland
When I use the Annotate method in an image, the translate parameter doesn't do anything.

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");
The same behavior happens (or rather, fails to happen) with ImageMagick 6.4.1 04/29/08 Q16 on Windows XP SP3, and with ImageMagick 6.4.1 04/30/08 Q16 on Linux 2.6.9-55.0.2.ELsmp.

Re: PerlMagick: Annotate doesn't translate

Posted: 2008-05-28T06:37:45-07:00
by magick
We have a patch for the problem you reported in ImageMagick 6.4.1-4 Beta available sometime tomorrow. Thanks.