Alexandre Julliard : gdi32: Pass the correct depth to PutImage for SetBitmapBits on a DIB.
Alexandre Julliard
julliard at winehq.org
Mon Dec 12 12:25:54 CST 2011
Module: wine
Branch: master
Commit: 70d8341a674582d2c1b9e99b7ea25c7d1110d8e6
URL: http://source.winehq.org/git/wine.git/?a=commit;h=70d8341a674582d2c1b9e99b7ea25c7d1110d8e6
Author: Alexandre Julliard <julliard at winehq.org>
Date: Mon Dec 12 14:34:48 2011 +0100
gdi32: Pass the correct depth to PutImage for SetBitmapBits on a DIB.
---
dlls/gdi32/bitmap.c | 10 ++++------
1 files changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c
index af9012b..0d637ec 100644
--- a/dlls/gdi32/bitmap.c
+++ b/dlls/gdi32/bitmap.c
@@ -481,7 +481,7 @@ LONG WINAPI SetBitmapBits(
/* query the color info */
info->bmiHeader.biSize = sizeof(info->bmiHeader);
info->bmiHeader.biPlanes = 1;
- info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel;
+ info->bmiHeader.biBitCount = bmp->dib ? bmp->dib->dsBmih.biBitCount : bmp->bitmap.bmBitsPixel;
info->bmiHeader.biCompression = BI_RGB;
info->bmiHeader.biXPelsPerMeter = 0;
info->bmiHeader.biYPelsPerMeter = 0;
@@ -494,11 +494,9 @@ LONG WINAPI SetBitmapBits(
if (!err || err == ERROR_BAD_FORMAT)
{
- info->bmiHeader.biPlanes = 1;
- info->bmiHeader.biBitCount = bmp->bitmap.bmBitsPixel;
- info->bmiHeader.biWidth = bmp->bitmap.bmWidth;
- info->bmiHeader.biHeight = -dst.height;
- info->bmiHeader.biSizeImage = dst.height * dst_stride;
+ info->bmiHeader.biWidth = bmp->bitmap.bmWidth;
+ info->bmiHeader.biHeight = -dst.height;
+ info->bmiHeader.biSizeImage = dst.height * dst_stride;
err = funcs->pPutImage( NULL, hbitmap, clip, info, &src_bits, &src, &dst, SRCCOPY );
}
if (err) count = 0;
More information about the wine-cvs
mailing list