Image magic problem Use of uninitialized value in numeric gt (>)

Image magic problem Use of uninitialized value in numeric gt (>)

am 21.03.2006 01:12:08 von dave

I am getting this error using ImageMagick Thumbnail

Use of uninitialized value in numeric gt (>) at
/usr/local/lib/perl5/site_perl/5.8.8/Image/Magick/Thumbnail. pm line 73.

the error occurs


$pathfile="/usr/local/www/html/community/uploads/tmpimage\/$ filetomove";
$src->Read("$pathfile");
# Create the thumbnail from it, where the biggest side is 500
px

error here ($thumb,$x,$y) =
Image::Magick::Thumbnail::create($src,500);


using ImageMagick-6.2.6, Image-Magick-Thumbnail-0.04 and
This is perl, v5.8.8 built for i386-freebsd

The same code works on my other server running on a linux platform

Any help appreciated thanks in advance

Re: Image magic problem Use of uninitialized value in numeric gt(>)

am 21.03.2006 02:59:51 von Gunnar Hjalmarsson

Dave wrote:
> I am getting this error using ImageMagick Thumbnail
>
> Use of uninitialized value in numeric gt (>) at
> /usr/local/lib/perl5/site_perl/5.8.8/Image/Magick/Thumbnail. pm line 73.

It's a warning.

> the error occurs
>
> $pathfile="/usr/local/www/html/community/uploads/tmpimage\/$ filetomove";
> $src->Read("$pathfile");
> # Create the thumbnail from it, where the biggest side is 500 px
>
> error here ($thumb,$x,$y) =
> Image::Magick::Thumbnail::create($src,500);
>
> using ImageMagick-6.2.6, Image-Magick-Thumbnail-0.04 and
> This is perl, v5.8.8 built for i386-freebsd
>
> The same code works on my other server running on a linux platform

Not sure I see the advantage of using Image::Magick::Thumbnail anyway.
Why not try without it:

my $err;
$err = $src->Thumbnail('500x500') and die $err;
$err = $src->Write('/path/to/thumbnail/file') and die $err;

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl