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

This commit is contained in:
Alexandre Julliard 2010-04-21 14:56:22 +02:00
parent 1ffab3ab4e
commit 50500d1a0b
1 changed files with 1 additions and 1 deletions

View File

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