From bf8ffa22dda393d3abaf8e6e0b54fda4897e2a55 Mon Sep 17 00:00:00 2001 From: Vincent Povirk Date: Fri, 12 Nov 2010 10:17:32 -0600 Subject: [PATCH] gdiplus: Correctly store the given stride in created bitmaps. --- dlls/gdiplus/image.c | 4 +++- 1 files changed, 3 insertions(+), 1 deletions(-) diff --git a/dlls/gdiplus/image.c b/dlls/gdiplus/image.c index e17edde..69f5865 100644 --- a/dlls/gdiplus/image.c +++ b/dlls/gdiplus/image.c @@ -1685,6 +1685,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, GdipFree(pbmi); if (!hbitmap) return GenericError; + + stride = dib_stride; } else { @@ -1727,7 +1729,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, (*bitmap)->hbitmap = hbitmap; (*bitmap)->hdc = NULL; (*bitmap)->bits = bits; - (*bitmap)->stride = dib_stride; + (*bitmap)->stride = stride; (*bitmap)->own_bits = own_bits; /* set format-related flags */ -- 1.7.1