home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / graphics / 11857 < prev    next >
Encoding:
Text File  |  1992-11-14  |  1.6 KB  |  37 lines

  1. Newsgroups: comp.graphics
  2. Path: sparky!uunet!charon.amdahl.com!pacbell.com!decwrl!csus.edu!netcom.com!kudzu
  3. From: kudzu@netcom.com (Michael Sierchio)
  4. Subject: Re: Wanted: 256 to 16 color dithering algorithm.
  5. Message-ID: <1992Nov13.183341.19972@netcom.com>
  6. Organization: True Love, and Home-Grown Tomatoes
  7. References: <1992Nov9.224811.21451@msuinfo.cl.msu.edu>
  8. Date: Fri, 13 Nov 1992 18:33:41 GMT
  9. Lines: 26
  10.  
  11. In article <1992Nov9.224811.21451@msuinfo.cl.msu.edu> 
  12.     kory@lcc.edu writes:
  13. >
  14. >    Does anyone have a good dithering algorithm that can
  15. >    take 256 colors  to 16 colors?
  16.  
  17. This problem isn't stated sufficiently -- do you mean a fixed set of
  18. sixteen colors, or a choice of any sixteen?
  19.  
  20. Cf. the Heckbert algorithm, and Floyd-Steinberg Dithering Algorithm
  21. in the FAQ.
  22.  
  23. In the case of the former -- you are converting to a color LUT architecture
  24. with sixteen entries -- you have both a color selection problem and a
  25. mapping problem.  Simply treat the 256 color image as if it were a 24-bit
  26. image, and  apply the Heckbert color selection, mapping, and FS dither.
  27.  
  28. In the case of a fixed set of colors, you must supply a mapping function
  29. that will map an (R,G,B) value to one of the 16 colors.  Then map each of
  30. the pixels using the FS dither algorithm as above, treating the 256 color
  31. image as a 24-bit image.
  32. -- 
  33. +--------------------------------------------------------------------------+
  34. |  Michael Sierchio                          1563 Solano Avenue, Suite 123 |
  35. |  kudzu@netcom.com                                Berkeley, CA 94707-2116 |
  36. +--------------------------------------------------------------------------+
  37.