- bcSize holds the size of the BITMAPHEADER structure (not the image size) and should already be set

- Clean up unneeded comments

svn path=/trunk/; revision=39179
This commit is contained in:
Gregor Schneider 2009-01-28 15:35:57 +00:00
parent 3f066801c8
commit aeb01dd869

View file

@ -657,10 +657,7 @@ NtGdiGetDIBitsInternal(HDC hDC,
coreheader->bcWidth = psurf->SurfObj.sizlBitmap.cx;
coreheader->bcPlanes = 1;
coreheader->bcBitCount = BitsPerFormat(psurf->SurfObj.iBitmapFormat);
/* Resulting height may be smaller than original height */
coreheader->bcHeight = psurf->SurfObj.sizlBitmap.cy;
coreheader->bcSize = DIB_GetDIBWidthBytes(coreheader->bcWidth,
coreheader->bcBitCount) * coreheader->bcHeight;
if (psurf->SurfObj.lDelta > 0)
coreheader->bcHeight = -coreheader->bcHeight;
}
@ -668,7 +665,6 @@ NtGdiGetDIBitsInternal(HDC hDC,
if (Info->bmiHeader.biSize >= sizeof(BITMAPINFOHEADER))
{
Info->bmiHeader.biWidth = psurf->SurfObj.sizlBitmap.cx;
/* Resulting height may be smaller than original height */
Info->bmiHeader.biHeight = psurf->SurfObj.sizlBitmap.cy;
Info->bmiHeader.biPlanes = 1;
Info->bmiHeader.biBitCount = BitsPerFormat(psurf->SurfObj.iBitmapFormat);
@ -890,9 +886,6 @@ NtGdiGetDIBitsInternal(HDC hDC,
if (Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
{
BITMAPCOREHEADER* coreheader = (BITMAPCOREHEADER*) Info;
coreheader->bcSize = DIB_GetDIBWidthBytes(DestSize.cx,
coreheader->bcBitCount) * DestSize.cy;
hDestBitmap = EngCreateBitmap(DestSize,
DIB_GetDIBWidthBytes(DestSize.cx, coreheader->bcBitCount),
BitmapFormat(coreheader->bcBitCount, BI_RGB),