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.
"No Decode Delegate" Following Host Software Upgrade.
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: "No Decode Delegate" Following Host Software Upgrade.
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.
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/
Re: "No Decode Delegate" Following Host Software Upgrade.
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?
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?
- anthony
- Posts: 8883
- Joined: 2004-05-31T19:27:03-07:00
- Authentication code: 8675308
- Location: Brisbane, Australia
Re: "No Decode Delegate" Following Host Software Upgrade.
That the ImageMagick Installation does not find any JPEG libraries.
Give then a small example such as
Give then a small example such as
Code: Select all
convert rose: rose.jpg
convert rose.jpg rose.gif
Anthony Thyssen -- Webmaster for ImageMagick Example Pages
https://imagemagick.org/Usage/
https://imagemagick.org/Usage/