Huw Davies : gdi32: Calculate the stride from the image size.
Alexandre Julliard
julliard at winehq.org
Mon Feb 13 15:24:40 CST 2017
Module: wine
Branch: master
Commit: a4f0415a5b2170c86e3cf4483b5a435bfdab9311
URL: http://source.winehq.org/git/wine.git/?a=commit;h=a4f0415a5b2170c86e3cf4483b5a435bfdab9311
Author: Huw Davies <huw at codeweavers.com>
Date: Mon Feb 13 14:08:03 2017 +0000
gdi32: Calculate the stride from the image size.
Signed-off-by: Huw Davies <huw at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
dlls/gdi32/bitmap.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/dlls/gdi32/bitmap.c b/dlls/gdi32/bitmap.c
index 4b7a2ed..768911a 100644
--- a/dlls/gdi32/bitmap.c
+++ b/dlls/gdi32/bitmap.c
@@ -267,7 +267,7 @@ LONG WINAPI GetBitmapBits(
if (!get_image_from_bitmap( bmp, info, &src_bits, &src ))
{
const char *src_ptr = src_bits.ptr;
- int src_stride = get_dib_stride( info->bmiHeader.biWidth, info->bmiHeader.biBitCount );
+ int src_stride = info->bmiHeader.biSizeImage / abs( info->bmiHeader.biHeight );
/* GetBitmapBits returns 16-bit aligned data */
More information about the wine-cvs
mailing list