Commit 32bbb0bb authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Correctly store the given stride in created bitmaps.

parent 9c238d18
...@@ -1685,6 +1685,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, ...@@ -1685,6 +1685,8 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
GdipFree(pbmi); GdipFree(pbmi);
if (!hbitmap) return GenericError; if (!hbitmap) return GenericError;
stride = dib_stride;
} }
else else
{ {
...@@ -1727,7 +1729,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, ...@@ -1727,7 +1729,7 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride,
(*bitmap)->hbitmap = hbitmap; (*bitmap)->hbitmap = hbitmap;
(*bitmap)->hdc = NULL; (*bitmap)->hdc = NULL;
(*bitmap)->bits = bits; (*bitmap)->bits = bits;
(*bitmap)->stride = dib_stride; (*bitmap)->stride = stride;
(*bitmap)->own_bits = own_bits; (*bitmap)->own_bits = own_bits;
/* set format-related flags */ /* set format-related flags */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment