home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.os.ms-windows.programmer.misc
- Path: sparky!uunet!capitol!hafey
- From: hafey@capitol.com (Rob Hafey)
- Subject: Need help with palettes...
- Message-ID: <1992Nov9.193815.24169@capitol.com>
- Organization: Capitol Disc Interactive
- Date: Mon, 9 Nov 1992 19:38:15 GMT
- Lines: 30
-
- I am having trouble getting a 256 color BMP image to display with the
- proper palette. I load in the file raw, extract the palette and
- create the palette (using the CreatePalette function). During the
- WM_ACTIVATE & WM_PAINT callbacks I select the palette (SelectPalette),
- realize the palette (RealizePalette) and then update the colors
- (UpdateColors). Finally I blit the image to the device
- (SetDIBitsToDevice). The problem is that the image adapts itself to
- the current palette but does not update the system palette. My colors
- are close but not identical to the image's palette.
-
- I am fairly sure that the palette I created is correct because if I
- run Photostyler and load the BMP image then my program remaps my image
- correctly.
-
- Does the SelectPalette,RealizePalette,UpdateColors route not update
- the system palette and just map the colors? Should I use the
- AnimatePalette function to force a palette change during the
- WM_ACTIVATE message? If anyone has experience with this I would
- appeciate any help. At this point I am beating my head against the
- wall and it's starting to hurt...
-
- Please EMAIL
-
- Rob
-
- --
- Rob Hafey
- Capitol Disc Interactive (CD-I)
- 2121 Wisconsin Ave NW, Washington D.C. 20007 (202)625-0141
- hafey@capitol.com
-