I had the same problem, and banged my head repeatedly until I came to a solution: explicitly provide the path to a valid font. Here's a working example (for me):
#!/usr/bin/perl
use Image::Magick;
$q = Image::Magick->new();
$q->Set(size => '80x20');
$q->Read('xc:white');
$q->Annotate(
text => 'Hi There',
font => '/usr/share/fonts/truetype/freefont/FreeSerif.ttf',
pointsize => 18,
fill => 'black',
gravity => 'Center',
);
$q->Write('whatever.png'); # who needs error checks?!? ;)
As you can see, TrueType fonts are welcome (you can find some here if you don't have one already).
Flavio
perl -ple'$_=reverse' <<<ti.xittelop@oivalf
Io ho capito... ma tu che hai detto?
|