Author: greatlrd
Date: Sun Sep 3 03:58:53 2006
New Revision: 23892
URL:
http://svn.reactos.org/svn/reactos?rev=23892&view=rev
Log:
Fixed some more wine test for NtGdiGetDIBits
FIxed so we can now create BITMAPCOREHEADER bitmap (Bugs in NtGdiGetDIBits did stop create
of it)
Modified:
trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
Modified: trunk/reactos/subsystems/win32/win32k/objects/dibobj.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
==============================================================================
--- trunk/reactos/subsystems/win32/win32k/objects/dibobj.c (original)
+++ trunk/reactos/subsystems/win32/win32k/objects/dibobj.c Sun Sep 3 03:58:53 2006
@@ -401,10 +401,14 @@
{
BITMAPCOREHEADER* coreheader = (BITMAPCOREHEADER*) Info;
coreheader->bcWidth =BitmapObj->SurfObj.sizlBitmap.cx;
- coreheader->bcHeight = BitmapObj->SurfObj.sizlBitmap.cy;
coreheader->bcPlanes = 1;
coreheader->bcBitCount =
BitsPerFormat(BitmapObj->SurfObj.iBitmapFormat);
- Result = BitmapObj->SurfObj.sizlBitmap.cy;
+
+ coreheader->bcHeight = BitmapObj->SurfObj.sizlBitmap.cy;
+ if (BitmapObj->SurfObj.lDelta > 0)
+ coreheader->bcHeight = -coreheader->bcHeight;
+
+ Result = BitmapObj->SurfObj.sizlBitmap.cy;
}
if (Info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))
@@ -457,12 +461,28 @@
ScanLines = min(ScanLines, BitmapObj->SurfObj.sizlBitmap.cy - StartScan);
DestSize.cx = BitmapObj->SurfObj.sizlBitmap.cx;
DestSize.cy = ScanLines;
- DestBitmap = EngCreateBitmap(
- DestSize, DIB_GetDIBWidthBytes(DestSize.cx,
- Info->bmiHeader.biBitCount),
- BitmapFormat(Info->bmiHeader.biBitCount,
Info->bmiHeader.biCompression),
- 0 < Info->bmiHeader.biHeight ? 0 : BMF_TOPDOWN,
- Bits);
+
+ DestBitmap = NULL;
+ if (Info->bmiHeader.biSize == sizeof(BITMAPINFOHEADER))
+ {
+ DestBitmap = EngCreateBitmap( DestSize,
+ DIB_GetDIBWidthBytes(DestSize.cx,
Info->bmiHeader.biBitCount),
+ BitmapFormat(Info->bmiHeader.biBitCount,
Info->bmiHeader.biCompression),
+ 0 < Info->bmiHeader.biHeight ? 0 :
BMF_TOPDOWN,
+ Bits);
+ }
+
+ if (Info->bmiHeader.biSize == sizeof(BITMAPCOREHEADER))
+ {
+ BITMAPCOREHEADER* coreheader = (BITMAPCOREHEADER*) Info;
+
+ DestBitmap = EngCreateBitmap( DestSize,
+ DIB_GetDIBWidthBytes(DestSize.cx,
coreheader->bcBitCount),
+ BitmapFormat(coreheader->bcBitCount,
BI_RGB),
+ 0 < coreheader->bcHeight ? 0 :
BMF_TOPDOWN,
+ Bits);
+ }
+
if(DestBitmap == NULL)
{
@@ -504,7 +524,7 @@
}
if (Usage == DIB_PAL_COLORS)
{
- DbgPrint("GetDIBits with DIB_PAL_COLORS isn't implemented
yet.");
+ DPRINT1("GetDIBits with DIB_PAL_COLORS isn't implemented
yet.");
}
}