Path: utzoo!utgpu!watserv1!watmath!att!att!emory!wuarchive!julius.cs.uiuc.edu!apple!agate!e260-3f!c60c-3fz From: c60c-3fz@e260-3f.berkeley.edu (In Sik Rhee) Newsgroups: comp.windows.ms.programmer Subject: 236 color GIF's on Windows? 20 more colors, please! Summary: GIF, BMP, Metafile for Windows 3.0 Keywords: GIF BMP METAFILE VGA Message-ID: <1990Nov5.102146.27535@agate.berkeley.edu> Date: 5 Nov 90 10:21:46 GMT Sender: usenet@agate.berkeley.edu (USENET Administrator) Organization: University of California, Berkeley Lines: 35 After hacking away for 13 straight hours today, I finished my GifImp code finally... Surprise, surprise, the pre-release ships tomorrow (actually, today... yawn!). but I haven't quite perfected it, so I'm asking for some advice/tips/help... As I have it now, I am importing a GIF and creating a DIB (Device-Independant Bitmap) which, in turn, becomes a Metafile... now, the problem I face is that with a 256 color GIF image, I create a logical palette... but when I select and realize it, windows will not let me take precedence over its 20 primary colors in the system palette... so essentially, it will only give me 236 color indices... (or am I doing something wrong?) so for now, I am setting the last 20 colors the value of the 236th color (usually works out since most 256 color vga shots are digitized pics which have very close color values for closely mapped values) and you really cant tell the difference unless you looked for it. But I'm a purist, so I want to know how I can incorporate all my 256 colors (or as many as possible) for my application. I have one hypothesis that I think may work... In addition to selecting and realizing the logical palette, I can pass literal RGB values to the DIB instead of color indices... Wouldn't that give me the same results for the 236 colors already defined? and as for the last 20 colors, since windows palette manager will use a "best-match" algorithm, wouldn't they be mapped to the nearest possible pre-defined colors? so that way, instead of having them all be the 236th color, they'll be the closest color out of the 236 colors (+20 system colors) Can someone help me out? Am I making any sense? I'd like to get this problem solved so I can go onto bigger problems at hand (like trying to get Word for Windows and Microsoft PowerPoint to use my filter correctly) Thanks in advance for any comments... InSik Rhee