TIFF image won't annotate unless it is ridiculously small. H
Posted: 2007-02-09T12:54:52-07:00
Hi I have code to annotate a tiff and write the new image. It works fine for tiff files less that about 100k in size. If I use a larger tiff the new tiff file is written but the annotation never occurs.
Help.
-Andy
Help.
-Andy
Code: Select all
use Image::Magick;
use CGI;
my $query = new CGI; # create new CGI object
my $text = ($query->param("text") or "BLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAHBLAH");
my $file = ($query->param("File") or "watermark/p1.tif");
$image=Image::Magick->new(magick=>'tif'); works.a
$x=$image->ReadImage($file);
warn "$x" if "$x";
$image->Annotate(text=>$text,font=>'@c:/winnt/fonts/arial.ttf',pen=>'blue', rotate=>-45, style=>'Italic', gravity=>'Center',pointsize=>72, antialias=>'true');
$image->Write('watermark/demo.tif');
undef($image);