TIFF image won't annotate unless it is ridiculously small. H

PerlMagick is an object-oriented Perl interface to ImageMagick. Use this forum to discuss, make suggestions about, or report bugs concerning PerlMagick.
Post Reply
broomballboy

TIFF image won't annotate unless it is ridiculously small. H

Post by broomballboy »

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

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

Re: TIFF image won't annotate unless it is ridiculously small. H

Post by magick »

We could not reproduce the problem. We used your script to annotate images up to 2MB and 2500x2500 in size. We're using ImageMagick 6.3.2-4.
broomballboy

Re: TIFF image won't annotate unless it is ridiculously small. H

Post by broomballboy »

Thanks for the reply. This is day 3 of banging at this with no success.

I am using ImageMagick 6.3.2 with release date 1/31/2007.

I have ActivePerl 5.8.3.809 on a windows server.

and the latest PerlMagick from the website.

A 120k image that will not work can be found here.

http://www.broomballboy.com/images/120.tif
User avatar
magick
Site Admin
Posts: 11064
Joined: 2003-05-31T11:32:55-07:00

Re: TIFF image won't annotate unless it is ridiculously small. H

Post by magick »

Your image is quite large (9600x7600) so ImageMagick is probably caching it to disk which is 1000 times slower than in-memory conversion. This most likely is causing a timeout on your HTTP session. For a discussion, see http://magick.imagemagick.org/script/architecture.php.
Post Reply