Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!falk From: falk@sun.uucp (Ed Falk) Newsgroups: comp.graphics Subject: Re: Color Pallet Mapping? Message-ID: <71228@sun.uucp> Date: 3 Oct 88 04:38:17 GMT References: <101880001@hpcvlx.HP.COM> <522@epicb.UUCP> Organization: Sun Microsystems, Inc. - Mtn View, CA Lines: 20 In article <522@epicb.UUCP>, david@epicb.UUCP (David P. Cook) writes: > In article <101880001@hpcvlx.HP.COM> btc@hpcvlx.HP.COM (Bob Clark) writes: > >I am using an AT&T Targa 16 board to capture images from a video camera. > >It stores each pixel in RGB with 5 bits/color. I would like to display > >the image on a VGA display, except that it only has a color pallet of > >256 colors. How should one map from the larger color pallet to the > >smaller one? I naively thought this would be trivial, but am not satisfied > >with my results. I recently posted an implementation of the Median Cut algorithm described by Heckbert in the '82 Siggraph proceedings. Try to look it up, it's pretty much the best source on this algorithm. If you can't find my median-cut implementation, let me know and I'll mail you a copy. -- -ed falk, sun microsystems sun!falk, falk@sun.com terrorist, cryptography, DES, drugs, cipher, secret, decode, NSA, CIA, NRO.