[Xitami] DG perl module

Daniel Nowlin xitami@lists.xitami.org
Tue, 23 Dec 2003 15:27:13 -0600


Thanks, I am looking at it now.  Rather hard to find examples on how to
create thumbs.  What I am wanting is to give the routine the JPG file and
have it create the thumb and send it to the browser.  All of this in a perl
CGI program.  I do not want it to save the thumb at all just create it and
send it to the browser.  I do not know if this can be done but it is rather
interesting to try.
----- Original Message ----- 
From: "Brad Smith" <mata@matatech.tzo.com>
To: <xitami@lists.xitami.org>
Sent: Tuesday, December 23, 2003 2:38 PM
Subject: Re: [Xitami] DG perl module


> If you don't mind me offering an alternative suggestion, I prefer to use
> ImageMagick for graphic work.  You need to download the
> ImageMagick library (available as an executable for Win32), then install
> either imagemagick or perlmagick from PPM.  The module's name has
> changed, and I can't remember what it is called now, but I do know it is
> one of those.
>
> I found GD to be weak for my purposes, mainly to create graphs on
> demand.  Now, I use ImageMagick and OLE to create the graphs.
>
> Check out imagemagick.org.  In retrospect, I think the Win32 executable
> also includes the perl module; so, you probably won't even need to
> install it from PPM.
>
> Sincerely,
> Brad Smith
>
>
>
>
> On 23 Dec 2003 at 10:21, Daniel Nowlin wrote:
>
> > Well I uninstalled the GD package that I installed with ppm3 and
installed
> > GD with ppm2.  I get the same result.  The GD package fails at line 139.
> > This is in the newfromjpeg subroutine on line 3.  This is the code that
I am
> > using to call GD:
> >
> >    $width = '96';
> >   $pic_tmp = newFromJpeg GD::Image("$pic_file[$count]");
> >   ($pic_imgW, $pic_imgH) = $pic_tmp->getBounds();
> >   $ratio = ($pic_imgW / $width);
> >   $height  = int($pic_imgH/$ratio);
> >   $FinalImg = new GD::Image($width,$height);
> >
> >
$FinalImg->copyResized($pic_tmp,0,0,0,0,$width,$height,$pic_imgW,$pic_imgH);
> >
> >   binmode STDOUT;
> >
> >   print "Content-type: image/jpeg; name=\"${file}_thumb\.jpg\"\n";
> >   print "Content-Disposition: inline;
> > filename=\"thumb_$pic_file[$count]\.jpg\"\n\n";
> >   print $FinalImg->jpeg;
> >
> > What I am attempting is to have GD create a thumbnail image of a jpg
> > picture.  Any ideas will be welcomed.
> > Dan
> >
> > ----- Original Message ----- 
> > From: "Daniel Nowlin" <nowlind@missouri.edu>
> > To: <xitami@lists.xitami.org>
> > Sent: Tuesday, December 23, 2003 10:04 AM
> > Subject: Re: [Xitami] DG perl module
> >
> >
> > > thanks for the info.  I will try to do an un-install and use ppm2.
> > > ----- Original Message ----- 
> > > From: "Francis Turner" <francis.turner@freesbee.fr>
> > > To: <xitami@lists.xitami.org>
> > > Sent: Tuesday, December 23, 2003 2:32 AM
> > > Subject: Re: [Xitami] DG perl module
> > >
> > >
> > > > Daniel Nowlin wrote:
> > > >
> > > > >Has anybody tried to install the perl module called GD?  If so how
did
> > > you get it installed.  I am running ActiveState perl version 5.8 and I
> > have
> > > tried the ppm but it does not install.
> > > > >
> > > > >
> > > > Using Activestate perl 5.6.something I have had no problems at all
with
> > > > installing GD and (getting it to run with Xitami)...  I'm pretty
sure I
> > > > used the version 2 ppm rather than the ver 3 one that newer
activestate
> > > > builds tend to make the default.
> > > >
> > > > Francis
> > > >
> > > > -- 
> > > > Your theory of a donut-shaped universe is intriguing, Homer.
> > > > I may have to steal it.        -- Prof S. Hawking on the "Simpsons"
> > > >
> > > >
> > > >
> > > > --
> > > > Xitami Users Mailing List -- For Xitami support
> > > > To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> > > >
> > >
> > >
> > > --
> > > Xitami Users Mailing List -- For Xitami support
> > > To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> > >
> >
> >
> > --
> > Xitami Users Mailing List -- For Xitami support
> > To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
> >
>
>
>
> --
> Xitami Users Mailing List -- For Xitami support
> To unsubscribe: http://lists.xitami.org/mailman/listinfo/xitami
>