Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

How to get jpeg support in Imager?

by Anonymous Monk
on Jul 03, 2005 at 05:40 UTC ( #471991=perlquestion: print w/replies, xml ) Need Help??

Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

I am trying to use imager, but I get the error that jpegs are not supported.
ModPerl::Registry: format 'jpeg' not supported at /usr/lib/perl5/5.8.0/CGI/Carp.pm

I have been looking but can not find how to install this. I am new to linux so a little lost.

Any Help?

Oh and this is the code.
my $img = Imager->new(); $img->read(file=>"$config{'basepath'}pictures/$filename") or die $img- +>errstr(); $img = $img->scale(xpixels=>$config{'imgmax'},ypixels=>$config{'imgmax +'},type=>'min'); $img->write(file=>"$config{'basepath'}thumbs/$filename", jpegquality=> +25) or die $img->errstr;

janitored by ybiC: Balanced <code> tags around code snippet, as per Monastery convention, and also balanced <tt> tags around error message

Replies are listed 'Best First'.
Re: How to get jpeg support in Imager?
by bart (Canon) on Jul 03, 2005 at 09:18 UTC
    I think your Imager module got installed without some of the desired (but not required) libraries installed first. I would advise you to check out what library you're missing, but I'm virtually sure it's the IJG (Independent JPEG Group)'s widely used "JPEG Source". I guess the workflow is: Uninstall Imager, install JPEGSRC, install Imager. You might be missing more libraries, check those out first, too.

    I can see there's a list of external libraries in the README file. And indeed, it uses the IJG's library.

Re: How to get jpeg support in Imager?
by matthewb (Curate) on Jul 03, 2005 at 11:11 UTC

    I set up a Debian server last month and had to apt-get libjpeg62-dev to satisfy this dependency.


    MB
Re: How to get jpeg support in Imager?
by davidrw (Prior) on Jul 03, 2005 at 12:31 UTC
    As the above posts say, it's almost certainly that you don't have libjpeg installed. How did you install Imager? Taking a quick glance at the Makefile, it looks like it shouldn't have let you install it w/o libjpeg installed.

    Obligatory TMTOWTDI: Image::Magick is a popular package for manipulating with images (it also will need libjpeg i believe).

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlquestion [id://471991]
Approved by davido
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others having an uproarious good time at the Monastery: (6)
As of 2020-10-28 09:19 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    My favourite web site is:












    Results (260 votes). Check out past polls.

    Notices?