The information in this article applies to:
SYMPTOMSThe colors in DIBs obtained through a conversion from 1 bit per pixel or 4 bits per pixel to 8 bits per pixel may not reflect the colors the original image was created with. CAUSEGetDIBits does not fill in the color table properly when converting either 1bpp or 4bpp DIB sections to 8bpp. Instead of initializing the color table of the 8bpp image using the colors from the color table of the source image, the color table is initialized with false values. The behavior of this function is incompatible with the behavior on Windows 95 and Windows 98. RESOLUTIONInstead of using GetDIBits() to retrieve the bits directly from the DIB section, create an 8bpp DIB section and initialize its color table using the color table retrieved from the 1bpp/4bpp image. After this is done you can BitBlt() from the 1bpp/4bpp DIB section to the 8bpp DIB section in order to convert the format of the bits to 8bpp. STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. Additional query words:
Keywords : kbBitmap kbDibSect kbGDI kbWinOS2000 kbSDKWin32 kbGDIFAQ |
Last Reviewed: December 15, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |