[PATCH 6/8] gdi32: Calculate the stride from the image size.

Huw Davies huw at codeweavers.com
Mon Feb 13 08:08:03 CST 2017


Signed-off-by: Huw Davies <huw at codeweavers.com>
---
 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 */
 
-- 
2.10.2




More information about the wine-patches mailing list