gdi32: Fix handling of bitmap header size for V4/V5 bitmaps.
This commit is contained in:
parent
1ffab3ab4e
commit
50500d1a0b
|
@ -139,7 +139,7 @@ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse )
|
||||||
if (!colors && (info->bmiHeader.biBitCount <= 8))
|
if (!colors && (info->bmiHeader.biBitCount <= 8))
|
||||||
colors = 1 << info->bmiHeader.biBitCount;
|
colors = 1 << info->bmiHeader.biBitCount;
|
||||||
if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3;
|
if (info->bmiHeader.biCompression == BI_BITFIELDS) masks = 3;
|
||||||
return sizeof(BITMAPINFOHEADER) + masks * sizeof(DWORD) + colors *
|
return info->bmiHeader.biSize + masks * sizeof(DWORD) + colors *
|
||||||
((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD));
|
((coloruse == DIB_RGB_COLORS) ? sizeof(RGBQUAD) : sizeof(WORD));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue