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