winex11: Fix handling of bitmap header size for V4/V5 bitmaps.

This commit is contained in:
Alexandre Julliard 2010-04-21 14:56:32 +02:00
parent 3a263a871c
commit 3f1c526ea2
1 changed files with 1 additions and 1 deletions

View File

@ -208,7 +208,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));
} }
} }