Commit 16145177 authored by Huw Davies's avatar Huw Davies Committed by Alexandre Julliard

Honour DIB_PAL_COLORS when the bitmap depths match.

parent 605064a4
......@@ -433,7 +433,14 @@ INT WINAPI GetDIBits(
/* If the bitmap object already has a dib section at the
same color depth then get the color map from it */
if (bmp->dib && bmp->dib->dsBm.bmBitsPixel == info->bmiHeader.biBitCount) {
if(coloruse == DIB_RGB_COLORS)
GetDIBColorTable(hdc, 0, 1 << info->bmiHeader.biBitCount, info->bmiColors);
else {
WORD *index = (WORD*)info->bmiColors;
int i;
for(i = 0; i < 1 << info->bmiHeader.biBitCount; i++, index++)
*index = i;
}
}
else {
if(info->bmiHeader.biBitCount >= bmp->bitmap.bmBitsPixel) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment