home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #19 / NN_1992_19.iso / spool / comp / sys / mac / system / 11446 < prev    next >
Encoding:
Text File  |  1992-08-31  |  2.1 KB  |  47 lines

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