Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!spdcc!m2c!ulowell!masscomp!garyo From: garyo@masscomp.UUCP (Gary Oberbrunner) Newsgroups: comp.graphics Subject: Re: Smooth Scaling of Bitmap Fonts and other Graphics Inquiries Message-ID: <2449@masscomp.UUCP> Date: Sun, 25-Oct-87 18:41:45 EST Article-I.D.: masscomp.2449 Posted: Sun Oct 25 18:41:45 1987 Date-Received: Tue, 27-Oct-87 05:48:48 EST References: <4721@nsc.nsc.com> Reply-To: garyo@masscomp.UUCP (Gary Oberbrunner) Organization: MASSCOMP - Westford, Ma Lines: 42 Summary: Quick summary of map-squeezing methods In article <4721@nsc.nsc.com> misha@nsc.nsc.com (Michael Umansky) writes: > >is there a standard/good order in which different colors can be assigned >to each entry? This especially applies to mandelbrot type >images... >I would also like to take an image generated by posted 'tracer' program >and dither its 8 bit per pixel output to 4 bit per pixel output and >again I need to know which colors to assign to which of 16 entries. For mandelbrots you are on your own, but a connected path through color space is often used, sometimes with jumps to accent certain contours. index---. color-. | | | v v I.e.: ramp dark-red 0 yellow 20 blue 40 white 60 black 61 vivid-red 127 ... ^ | jump -: Where ramp interpolates in ihs space between the named CNS colors. RGB-space interpolation is ok too, it's just harder to get proper rainbows. For real images using small colormaps, the easiest method is to allocate the colors as follows: 1 plane red, two green, and one blue. Then dither r,g and b independently. Eight bits is usually done 3, 3 and 2 (r,g,b). You get better gray scales if you use an ihs mapping, as in 3 planes for intensity, 3 planes hue, 2 planes saturation. Of course the BEST way is to histogram the input image and build the color map using a weighted least-squares metric, and then dither among those colors, but this is a lot of work (especially dealing with those nasty few pixels that are far away for all the others...) The upshot is there are as many different ways to do it as there are images. Good luck! It's a lot of fun. -- Remember, -Truth is not beauty; Information is not knowledge; / Beauty is not love; Gary Oberbrunner Knowledge is not wisdom; / Love is not music; ...!masscomp!garyo Wisdom is not truth; ----/ Music is the best. - FZ