Subject: | Died on zero-sized files |
Client code:
my $image = Image::Resize->new("$filename");
my $gd = $image->resize($w, $h);
Result:
Died at /usr/local/share/perl/5.10.0/Image/Resize.pm line 25.
Image::Resize code:
} else {
unless ( -e $image ) { croak "Image::Resize->new(): file
'$image' does not exist"; }
$gd = GD::Image->new($image) or die $@;
}
You should check file size (as minimum) of file format (as maximum)
before trying to use GD::Image->new