Commit 04412f7a authored by Vincent Povirk's avatar Vincent Povirk Committed by Alexandre Julliard

gdiplus: Avoid accessing dib bits directly in GdipCreateBitmapFromHBITMAP.

parent c98767a4
......@@ -4694,17 +4694,6 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi
format, &lockeddata);
if (retval == Ok)
{
if (bm.bmBits)
{
for (y=0; y<bm.bmHeight; y++)
{
memcpy((BYTE*)lockeddata.Scan0+lockeddata.Stride*y,
(BYTE*)bm.bmBits+bm.bmWidthBytes*(bm.bmHeight-1-y),
bm.bmWidthBytes);
}
}
else
{
HDC hdc;
HBITMAP oldhbm;
BITMAPINFO *pbmi;
......@@ -4749,7 +4738,6 @@ GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBi
SelectObject(hdc, oldhbm);
DeleteDC(hdc);
}
GdipBitmapUnlockBits(*bitmap, &lockeddata);
}
......
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