Page 1 of 1

"No Decode Delegate" Following Host Software Upgrade.

Posted: 2007-08-16T16:03:13-07:00
by tony@tonybarre.com
Hello,
I use Image::Magick in a Perl script to scale photos uploaded onto a web site for high school Alumni. Here is the module extracted from the script:
<code>
$mimetype = uploadInfo ($photo)->{'Content-Type'};
read ( $photo, $full, (stat ($photo))[7]);
my $img = new Image::Magick;
$img->BlobToImage ($full);
$img->Scale (geometry => "250x250");
$full = $img->ImageToBlob();
</code>
My script worked fine for several months.
Recently my hosting service upgraded their software. I do not know the details. It appears now that the module produces an empty $full variable.
To focus my debugging efforts, I wrote a small script. Here it is:
<code>
#!/usr/bin/perl -w

use Image::Magick;
use CGI qw(:standard escape escapeHTML);
use CGI ':cgi-lib';
use LWP::Simple qw(!head);

print header (),
start_html (-title=> "Oak Ridge High School Alumni Registration",
-style=>{'src'=>'http://www.orhsfoundation.com/alumni/css/dynamic.css'});
print "<div id=\"wrapper\">\n";
print "<div id=\"masthead\">\n";
print "<a href=\"http://www.orhsfoundation.com/alumni/index.html\">
<img src=\"http://www.orhsfoundation.com/alumni/im ... header.jpg\"
alt=\"ORHS Alumni Banner\" width=\"740\" height=\"139\" border=\"0\"/></a></div>\n</div>";

my($image, $x);

$image = Image::Magick->new;
$x = $image->Read('header.jpg');
warn "$x" if "$x";

$x = $image->Crop(geometry=>'100x100+100+100');
warn "$x" if "$x";

$x = $image->Write('smallheader.jpg');
warn "$x" if "$x";

print end_html ();
</code>
This script runs, but no image files are converted. In my error log I find:
no decode delegate for this image format `header.jpg' at magickTest.pl line 21.

What should I tell my hosting service to help them solve this problem?
I believe their OS is Linux and they use Apache.

Thanks for Any Help.

Re: "No Decode Delegate" Following Host Software Upgrade.

Posted: 2007-08-18T18:24:47-07:00
by anthony
Unknwon Delegate generally means that the software package that IM was using to convert a image format is not missing. Most commonly postscript and PDF images need the ghostscript program installed, but other delegates are also used.

Re: "No Decode Delegate" Following Host Software Upgrade.

Posted: 2007-08-18T21:25:27-07:00
by tony@tonybarre.com
Thank you so much for your answer.
I will only use .jpg.
But I have no control over my host.
What should I tell my host in order to solve this problem?

Re: "No Decode Delegate" Following Host Software Upgrade.

Posted: 2007-08-22T00:15:45-07:00
by anthony
That the ImageMagick Installation does not find any JPEG libraries.

Give then a small example such as

Code: Select all

   convert rose:   rose.jpg
   convert rose.jpg  rose.gif