winex11: Fix handling of bitmap header size for V4/V5 bitmaps.
This commit is contained in:
parent
3a263a871c
commit
3f1c526ea2
|
@ -208,7 +208,7 @@ int bitmap_info_size( const BITMAPINFO * info, WORD coloruse )
|
|||
if (!colors && (info->bmiHeader.biBitCount <= 8))
|
||||
colors = 1 << info->bmiHeader.biBitCount;
|
||||
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));
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue