Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site watcgl.UUCP Path: utzoo!watmath!watnot!watcgl!dmmartindale From: dmmartindale@watcgl.UUCP (Dave Martindale) Newsgroups: net.graphics Subject: Re: Allocation of color map Message-ID: <1974@watcgl.UUCP> Date: Wed, 5-Jun-85 19:17:35 EDT Article-I.D.: watcgl.1974 Posted: Wed Jun 5 19:17:35 1985 Date-Received: Thu, 6-Jun-85 03:23:34 EDT References: <12800001@umn-cs.UUCP> <218@rti-sel.UUCP> Reply-To: dmmartindale@watcgl.UUCP (Dave Martindale) Organization: U of Waterloo, Ontario Lines: 14 This is a hard problem, I think. What you really want is to find a set of 256 points in RGB space such that when the set of all colours present in the image are each mapped to their nearest represented colour, the sum of the errors are minimized. And you probably want to weight this sum according to the visibility to the eye of each error. I think there was a paper presented at SIGGRAPH a year or two ago that dealt with the subject; unfortunately my proceedings are still packed somewhere. What most people do with 8-bit frame buffers is just allocate 3 bits for red, 3 bits for green, and 2 bits for blue. The colour map is easy to build, and encoding the pixels is easy. If you want the image to look realistic, don't forget to include gamma correction when building the colour map.