News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

DIBSection color table

Started by Biterider, July 26, 2006, 05:17:31 PM

Previous topic - Next topic

Biterider

Hi
I'm trying to encapsulate a Device Independent Bitmap (DIP) and I'm running into problems. I'm using intensively DIBSections and now I need to load a BMP from a file without passing through a DC to fill the DIBSection. (I don't want to remap the color to those of the DC) Since there is no direct API I searched and found that the LoadImage has a parameter (LR_CREATEDIBSECTION) that specifies that the API should create a DIBsection. So far, so good. The problem comes when I try to access the pixels of DIBSection that uses a color table. I can not find a way to get this table from the system created DIBSection! The only (ugly) workaround I can see is to load the table from the file.
Has some API guru a good idea?

Regards,

Biterider