Helpful Information
 
 
Category: CGI Scripts / Perl
Imagemagick Error 420 - no decode delegates

I'm trying to use Perl with Image::Magick without success. This is the test script:


#!/usr/bin/perl
use Image::Magick;

print "Content-type: text/html\n\n<pre>";

print "Image Magick version: ", ${'Image::Magick::VERSION'}, "\n";

$filename = "test.jpg";
$image = Image::Magick->new;
$msg = $image->Read($filename);
print "Image Read status: $msg\n";

And this is the resulting error message


Image Magick version: 5.55
Image Read status: Exception 420: No decode delegate for this image format (test.jpg)

Does this mean the installation of Image::Magick on the server is bad, or are there environment variables that need to be set?

ImageMagick is avilable, but without much of the functionality normally expected of ImageMagick because of problems configuring it for our servers. As we move to WestHost 2.0 we will have full support for ImageMagick, but until then you can use GD, a similar type program which does work fully with both PHP and Perl.

until then you can use GD

Hrm.

[chefhelper][~/www/fredanddeb]$ perl resize.pl
Can't locate GD.pm in @INC (@INC contains: /usr/local/perl/lib/5.6.0/i686-linux /usr/local/perl/lib/5.6.0 /usr/local/perl/lib/site_perl/5.6.0/i686-linux /usr/local/perl/lib/site_perl/5.6.0 /usr/local/perl/lib/site_perl .) at resize.pl line 1.
BEGIN failed--compilation aborted at resize.pl line 1.

I tried to install it (after installing GCC) but the install failed.
> perl -MCPAN -e 'install GD'
...
GD.xs:1895: warning: assignment makes pointer from integer without a cast
make: *** [GD.o] Error 1
/bin/make -- NOT OK

WestHost has responded about ImageMagick in this post http://forums.westhost.com/phpBB2/viewtopic.php?p=8694#8694 that is a link to my last post in the area. If you scroll up you well see what WestHost had to say.










privacy (GDPR)