Thread: palette problem

  1. #1
    Registered User
    Join Date
    Sep 2001
    Posts
    173

    Unhappy palette problem

    Hi guys:
    When displaying the 8-bit bitmaps on the screen in DirectX,
    we have to set the palette to the LPDIRECTDRAWPALETTE interface, the palette's value is from the bitmap.
    Well, yes, it works if only shows one bitmap, but if there are two or more bitmaps, I don't know which bitmap palette should be attached to the primary surface.
    I've tried to choose one of the bitmap's palette, the other one was nice shown without any color distortion, but sometimes not.

    Thanx,I hope to make my question clear

  2. #2
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    1) Save both bitmaps with the same palette
    2) Use 16bit colours
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  3. #3
    Registered User
    Join Date
    Sep 2001
    Posts
    173
    yes, I think each 8-bit bitmap has it's own palette, how can I save them within same palette?option 2 is a quite nice answer too
    Don't laugh at me,I am just a SuperNewbie.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Need help understanding a problem
    By dnguyen1022 in forum C++ Programming
    Replies: 2
    Last Post: 04-29-2009, 04:21 PM
  2. Memory problem with Borland C 3.1
    By AZ1699 in forum C Programming
    Replies: 16
    Last Post: 11-16-2007, 11:22 AM
  3. Someone having same problem with Code Block?
    By ofayto in forum C++ Programming
    Replies: 1
    Last Post: 07-12-2007, 08:38 AM
  4. A question related to strcmp
    By meili100 in forum C++ Programming
    Replies: 6
    Last Post: 07-07-2007, 02:51 PM
  5. WS_POPUP, continuation of old problem
    By blurrymadness in forum Windows Programming
    Replies: 1
    Last Post: 04-20-2007, 06:54 PM