PDA

View Full Version : ImageMagick and Perl



StonePiano
April 9th, 2005, 11:58 AM
Hi,

I installed Image::Magick on my redhat machine at work, and in Perl I can resize images like:


#!/usr/bin/perl -w

use Image::Magick;

my $pic = Image::Magick->new();
my $x = $pic->Read("pic.jpg");
print $x if $x;
$y=$pic->Scale('150x150');
$pic->Write("new.jpg");

It works great on my redhat box.

But when I do it on my Ubuntu Warty machine at home, I get the following Exception error:
420: no decode delegate for this image format `pic.jpg'

Does anyone have any ideas as to what is is and how I can get a decode delegate for jpg format on my ubuntu machine?

(Running Warty. It seems clear to me that it's a software component missing, so I've not included hardware details.)

Many thanks for any help or insight,
StonePiano

kperkins
April 9th, 2005, 04:45 PM
Are your jpeg libraries (libjpeg*) installed?

StonePiano
April 9th, 2005, 07:29 PM
Are your jpeg libraries (libjpeg*) installed?

I think so. On a find, I get:

root@kiboko:/ # find . -name "libjpeg*" -print
./var/lib/dpkg/info/libjpeg62.postinst
./var/lib/dpkg/info/libjpeg62.list
./var/lib/dpkg/info/libjpeg62.shlibs
./var/lib/dpkg/info/libjpeg62.md5sums
./usr/share/doc/libjpeg62
./usr/lib/libjpeg.so.62.0.0
./usr/lib/libjpeg.so.62
./usr/lib/gthumb/modules/libjpegtran.so
./usr/local/jdk1.5.0_02/jre/lib/i386/libjpeg.so

Also, in the Synaptic Package Manager, a search turns up libjpeg62, which I have.

StonePiano