Path: utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!ames!sun-barr!cs.utexas.edu!uunet!cbmvax!mitchell From: mitchell@cbmvax.UUCP (Fred Mitchell - QA) Newsgroups: comp.graphics Subject: Re: How to map 24-bit RGB to best EGA/VGA palette? Keywords: RGB EGA VGA color Message-ID: <7771@cbmvax.UUCP> Date: 29 Aug 89 03:58:28 GMT References: <3129@cbnewsm.ATT.COM> <7743@cbmvax.UUCP> <13319@well.UUCP> <586@celit.com> <4862@eos.UUCP> <13381@well.UUCP> Reply-To: mitchell@cbmvax.UUCP (Fred Mitchell - QA) Distribution: na Organization: Commodore Technology, West Chester, PA Lines: 27 In article <13381@well.UUCP> gors@well.UUCP (Michael Sierchio) writes: >Actually, doing R, G & B separately has a few problems -- that's "taxicab" >distance, rather than Euclidean distance, for one -- the other is that such >an error measure relies on a uniform color metric, and the RGB cube is not >uniform, in that equidistant colors in the color cube are not equidistant >to the "standard" observer's perceptual apparatus. What you state is true, but you must keep in mind that we are going from 16 million colors to 16 or 64 colors. The amount of error encountered would not be significant enough to be noticed at such a color quantization level. Also, I've neglected to consider dithering in my approach, which should've been addressed, but I am in the process of working out the details. If you know of a *fast*, reasonably accurate algorithm to accomplish this, then by all means, tell! My current implementation (written in 'C' on a 68000-based machine) takes about a minute to process a 24-bit image down to a 32-color pallette, at 320x400. With optimization, I could speed it up a bit, but I would rather have it do it in 1/10 the time. Speed is of the esscence! -- |*******************************************| -Compliments of /// |* All thoughts and comments are soley *| Fred Mitchell \\\/// |* thoses of The Author and has nothing to *| \XX/ |* do with Commodore-Amiga. *| Software QA - Commodore-Amiga |*******************************************|