Can`t write words into image(solved)
Posted: 2008-09-02T23:14:09-07:00
I want to add some words into image using image::magick, the code is below:
#!/usr/bin/perl -w
use Image::Magick;
$im = Image::Magick->new(size => '1300x5000');
$im->Read('xc:white');
$im->Set(stroke => 'red');
$im->Draw(primitive => 'rectangle',points => '0,0 399,299');
$text = 'Works like magick!';
$im->Annotate(font=>'times.ttf', pointsize=>40, fill=>'green', text=>$text);
$im->Write('png:GDExample.png');
the code is running well and even I can see the retangle on the image, but I can`t find the words!
Could you help me?
Thanks a lot!
#!/usr/bin/perl -w
use Image::Magick;
$im = Image::Magick->new(size => '1300x5000');
$im->Read('xc:white');
$im->Set(stroke => 'red');
$im->Draw(primitive => 'rectangle',points => '0,0 399,299');
$text = 'Works like magick!';
$im->Annotate(font=>'times.ttf', pointsize=>40, fill=>'green', text=>$text);
$im->Write('png:GDExample.png');
the code is running well and even I can see the retangle on the image, but I can`t find the words!
Could you help me?
Thanks a lot!