home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.sys.mac.system
- Path: sparky!uunet!gatech!darwin.sura.net!convex!news.utdallas.edu!corpgate!crchh327!crchh447!brunner
- From: brunner@crchh447.bnr.ca (James Brunner)
- Subject: Re: JPG to GIF or PICT converter
- Message-ID: <1992Aug31.152918.25507@bnr.ca>
- Sender: news@bnr.ca (News on crchh327)
- Nntp-Posting-Host: crchh447
- Reply-To: brunner@crchh447.bnr.ca (James Brunner)
- Organization: Bell-Northern Research, Richardson, Tx
- References: <1992Aug18.184816.17851@tin.monsanto.com> <1992Aug28.000024.25625@cello.hpl.hp.com>
- Date: Mon, 31 Aug 1992 15:29:18 GMT
- Lines: 33
-
- I will be posting shortly (to the alt.binaries.pictures.utilities group)
- ported versions of djpeg, giftoppm, ppmquant, pnmscale, cjpeg, & ppmtogif.
- I have done the minor changes necessary to get them to work with Think_C.
- Also, I have optimized the hell out of ppmquant. It's still slow, but it's
- at least 15% faster than the original version (I haven't done any real timing
- yet, just estimates based on the output from the profiler).
-
- For those of you who don't know, ppmquant is from a set of UNIX utils called
- PBMplus. I think that it is about the best quantizer around. It has an option
- for floyd-steinberg dithering as well.
- djpeg - jpeg to ppm
- giftoppm - gif to ppm
- ppmquant - quantizer for ppm images
- pnmscale - scales a ppm image
- cjpeg - ppm to jpeg
- ppmtogif - ppm to gif
-
- to convert from jpeg to gif, I have found this to be an excellent method:
- (UNIX piping format - on Mac, my version uses Think_C cconsole)
- djpeg image.jpg | ppmquant -fs 256 | ppmtogif >image.gif
-
- To shrink an image (by half in each dimension), this works great:
- djpeg image.jpg | pnmscale .5 | ppmquant -fs 256 | ppmtogif >image.gif
-
- To shrink a gif image, this works MUCH better than the scaling in most gif
- viewers because the pixels are averaged and the image is re-quantized.
- giftoppm image.gif | pnmscale .5 | ppmquant -fs 256 | ppmtogif >image2.gif
-
- --
- ---------------------------------------------------------------------------
- Jim Brunner - (brunner@bnr.ca)
- All opinions are my own and have nothing whatsoever to do with BNR, NT,
- NTI, Bell Canada, or any of the BCE corporations or affiliates.
-