(none) imager-devel
/ help / lists / applications / search /
 

Re: Re: Resizing a jpg file

From: Arnar Mar Hrafnkelsson (
03727@xyz.molar.is)
Date: Tue 20 Nov 2001 - 16:25:36 UTC

  • Next message: Tony Cook: "Re: Resizing a jpg file"

    The reason you get this is that when Imager was compiled it didn't find
    libgif and libjpeg. During the perl Makefile.PL step in the build
    procedure it will list which of the needed include files and libraries
    are found. If the libraries/includes are in non standard locations then
    then the format will be unavaliable. So either you have to give a hint to
    Makefile.PL about where to look for libraries (see the README file) or
    install the missing libraries.

    Hope this helps,

    -- Arnar.

    On Tue, 20 Nov 2001, gak wrote:

    > A follow-up to my previous message. Discovered that
    > the 'write' error is because the 'open' command it
    > failing. Opening a gif or jpg produces the error
    > message 'failed: format not supported'. Does this
    > indicate a host installation problem.
    >
    > Greg
    >
    >
    > --- gak <03761@xyz.molar.is> wrote:
    > > The capabilities of Imager are very exciting. We
    > > look
    > > forward to putting them to use. Tried the brief
    > > script shown at the top of the documentation, but
    > > I'm
    > > getting an error:
    > >
    > > "Can't call method 'write' on an undefined value.."
    > >
    > > It then references the scaled write command. Here
    > > is
    > > the code. What am I missing?
    > >
    > > #!/usr/bin/perl
    > > use CGI;
    > > use CGI::Carp qw/fatalsToBrowser/;
    > >
    > > use Imager qw(init);
    > >
    > > init();
    > >
    > > $img=Imager->new();
    > > $img->open(file=>'727_orig.jpg',type=>'jpeg')
    > > || print "failed: ",$img->{ERRSTR},"\n";
    > > $scaled=$img->scale(xpixels=>400,ypixels=>400);
    > > $scaled->write(file=>'727.jpg',type=>'jpeg')
    > > || print "failed: ",$scaled->{ERRSTR},"\n";
    > >
    > > print "Content-type: text/html\n\n";
    > > print "
    > > <html><head>
    > > <title>Done</title></head>
    > > <body>
    > > The file has been resized.
    > > </body></html>
    > > ";
    > >
    > > THANKS!
    > >
    > > __________________________________________________
    > > Do You Yahoo!?
    > > Yahoo! GeoCities - quick and easy web site hosting,
    > > just $8.95/month.
    > > http://geocities.yahoo.com/ps/info1
    > >
    >
    >
    > __________________________________________________
    > Do You Yahoo!?
    > Yahoo! GeoCities - quick and easy web site hosting, just $8.95/month.
    > http://geocities.yahoo.com/ps/info1
    >
    >



  •