PerlMagick: Annotate doesn't translate

Post any defects you find in the released or beta versions of the ImageMagick software here. Include the ImageMagick version, OS, and any command-line required to reproduce the problem. Got a patch for a bug? Post it here.
Post Reply
Ryland

PerlMagick: Annotate doesn't translate

Post 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.
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: PerlMagick: Annotate doesn't translate

Post by magick »

We have a patch for the problem you reported in ImageMagick 6.4.1-4 Beta available sometime tomorrow. Thanks.
Post Reply