home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / os / mswindo / programm / misc / 3328 < prev    next >
Encoding:
Text File  |  1992-11-09  |  1.5 KB  |  40 lines

  1. Newsgroups: comp.os.ms-windows.programmer.misc
  2. Path: sparky!uunet!capitol!hafey
  3. From: hafey@capitol.com (Rob Hafey)
  4. Subject: Need help with palettes...
  5. Message-ID: <1992Nov9.193815.24169@capitol.com>
  6. Organization: Capitol Disc Interactive
  7. Date: Mon, 9 Nov 1992 19:38:15 GMT
  8. Lines: 30
  9.  
  10. I am having trouble getting a 256 color BMP image to display with the
  11. proper palette.  I load in the file raw, extract the palette and
  12. create the palette (using the CreatePalette function).  During the
  13. WM_ACTIVATE & WM_PAINT callbacks I select the palette (SelectPalette),
  14. realize the palette (RealizePalette) and then update the colors
  15. (UpdateColors).  Finally I blit the image to the device
  16. (SetDIBitsToDevice).  The problem is that the image adapts itself to
  17. the current palette but does not update the system palette.  My colors
  18. are close but not identical to the image's palette.
  19.  
  20. I am fairly sure that the palette I created is correct because if I
  21. run Photostyler and load the BMP image then my program remaps my image
  22. correctly.
  23.  
  24. Does the SelectPalette,RealizePalette,UpdateColors route not update
  25. the system palette and just map the colors?  Should I use the
  26. AnimatePalette function to force a palette change during the
  27. WM_ACTIVATE message?  If anyone has experience with this I would
  28. appeciate any help.  At this point I am beating my head against the
  29. wall and it's starting to hurt...
  30.  
  31. Please EMAIL
  32.  
  33. Rob
  34.  
  35. -- 
  36.  Rob Hafey
  37.  Capitol Disc Interactive (CD-I) 
  38.  2121 Wisconsin Ave NW, Washington D.C. 20007   (202)625-0141 
  39.  hafey@capitol.com
  40.