[7006] in www-talk@info.cern.ch

home help back first fref pref prev next nref lref last post

Re: Image Converters

daemon@ATHENA.MIT.EDU (wmperry@spry.com)
Wed Dec 14 11:06:05 1994

Date: Wed, 14 Dec 1994 16:35:34 +0100
Errors-To: listmaster@www0.cern.ch
Reply-To: wmperry@spry.com
From: wmperry@spry.com
To: Multiple recipients of list <www-talk@www0.cern.ch>

Ralph Graw writes:
> [This message is converted from WPS-PLUS to ASCII]
> 
> When dynamically producing pages with <IMG SRC=...> tags, we've run into a 
> need to convert images from various formats (particularly JPEG) into GIF on 
> the fly.  A utility callable from a CGI script (Tcl running on Solaris) 
> would be ideal.  Surely the Unix world already has such and we don't have 
> to code this from scratch?  Not sure where we'd get the formats anyway... 

  You can use the JPEG-v5 and NETPBM utilities to do this, but I imagine
there is probably a faster way.  Something like this:

#!/bin/sh
echo 'Content-Type: image/gif'
echo 
djpeg [any options] filename | ppmtogif

  Unfortunately, this won't give you a content-length, but oh well. :)

-Bill P.

home help back first fref pref prev next nref lref last post