modify JPEG on the fly

From: Scott Taylor (scott_at_dctchambers.com)
Date: 12/30/03


Date: Tue, 30 Dec 2003 10:08:39 -0800 (PST)
To: beginners@perl.org


Hello all,

I'm using Apache 1.3.27, Perl 5.6.1 with DBI->DBD::Interbase on Linux
2.4 machine.

I have a CGI script which display a JPEG from an Interbase Blob. Now,
what I would like to do is modify the JPEG to make it into a useful
thumbnail.

here is the code that converts the blob (Thanks to Dan Muey, and
others for help with that a few months ago)

# loop through the SQL results
    while ( my ($PixData )
            = $sth->fetchrow ) {
            print header('image/jpeg');
            print $PixData;
    }

Now I want to send $PixData to a new command that will convert it from
a 640 X 480 @ 100% JPEG to 160 x 120 @ 30% JPEG.

Any ideas?

Cheers.

--
Scott


Relevant Pages

  • Re: Comments in image files
    ... the jpeg file, any OS can read and display the jpeg without any ... EXIF/IPTC fields, it's an application, Windows Explorer in your case. ... etc display different EXIF/IPTC fields is that it ... so I guess they qualify as EXIF ot IPTC. ...
    (rec.photo.digital)
  • Re: ANY SUGGESTIONS - IE 6.0 has problems with 1 Bpp color under CE 5.
    ... The JPEG thing has been around for a *long* time and isn't likely to be ... The only work-around is to not have the display driver look like a ... monochrome display. ... > Basically I'm having two problems with IE's webpage rendering engine. ...
    (microsoft.public.windowsce.app.development)
  • Printing JPEGs
    ... JPEG the application/computer 'hangs' - and in such ... Calibre, no problem occurs. ... The application - within the very well-established DrWimp printing ... the same for both the display call and the printing call. ...
    (comp.sys.acorn.programmer)
  • Re: Comments in image files
    ... the jpeg file, any OS can read and display the jpeg without any ... etc display different EXIF/IPTC fields is that it ... Interesting each apps developer seems to vary in what fields they feel are ... so I guess they qualify as EXIF ot IPTC. ...
    (rec.photo.digital)
  • Re: Displaying MAC graphics in IE6
    ... provide a link to each pix, they will display BUT if I embed them in the web page, I get the red x and they do not display. ... JPEG JFIF is the official name of the file format created for the purpose of transporting single JPEG-compressed images. ... Anyway, we know that IE has no problem displaying the images, as it knows what to do when fed a URL that ends in .jpg. ... The server may not be sending a proper MIME type with the inline image, so IE has no idea what to do with it. ...
    (comp.sys.mac.graphics)