"No Decode Delegate" Following Host Software Upgrade.
Posted: 2007-08-16T16:03:13-07:00
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.
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.