Xref: utzoo comp.graphics:10282 comp.sys.ibm.pc.programmer:311 Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!uunet!microsoft!kensy From: kensy@microsoft.UUCP (Ken SYKES) Newsgroups: comp.graphics,comp.sys.ibm.pc.programmer Subject: Re: 256 GrayScale Matching to 256 Colors Keywords: Look Up Table Needed Message-ID: <53002@microsoft.UUCP> Date: 8 Mar 90 19:12:05 GMT References: <858@dukempd.phy.duke.edu> Reply-To: kensy@microsoft.UUCP (Ken SYKES) Organization: Microsoft Corp., Redmond WA Lines: 13 Hello, PCs are only able to display 64 shades of a given component since the D/A converters are 6 bits. To display these images on your screen fill up the first 64 entries of your palette with <0,0,0>,<1,1,1>,...,<63,63,63> and then place the data in the frame buffer, multiplying each value by 63/255. This will linearly scale your grayscale values to the proper range. There are several books that explain how to program PC displays at B. Dalton et al. Hope this helps, Ken Sykes