mirror of
git://source.winehq.org/git/wine.git
synced 2024-09-30 05:31:39 +00:00
gdiplus: Fix DIB stride calculation in GdipDrawImagePointsRect.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=56800
This commit is contained in:
parent
be427c312b
commit
6753f25f58
|
@ -3427,6 +3427,7 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
|
|||
BITMAPINFOHEADER bih;
|
||||
BYTE *temp_bits;
|
||||
PixelFormat dst_format;
|
||||
INT dib_stride;
|
||||
|
||||
src_hdc = CreateCompatibleDC(0);
|
||||
|
||||
|
@ -3453,8 +3454,10 @@ GpStatus WINGDIPAPI GdipDrawImagePointsRect(GpGraphics *graphics, GpImage *image
|
|||
hbitmap = CreateDIBSection(src_hdc, (BITMAPINFO*)&bih, DIB_RGB_COLORS,
|
||||
(void**)&temp_bits, NULL, 0);
|
||||
|
||||
dib_stride = ((bitmap->width * PIXELFORMATBPP(dst_format) + 31) / 8) & ~3;
|
||||
|
||||
convert_pixels(bitmap->width, bitmap->height,
|
||||
bitmap->width*PIXELFORMATBPP(dst_format)/8, temp_bits, dst_format, bitmap->image.palette,
|
||||
dib_stride, temp_bits, dst_format, bitmap->image.palette,
|
||||
bitmap->stride, bitmap->bits, bitmap->format,
|
||||
bitmap->image.palette);
|
||||
|
||||
|
|
Loading…
Reference in a new issue