gdiplus: Explicitly copy the bits from dib sections to new bitmaps.
commit3424dac3863f57c5d9724a31744469b9fcd4bd89
authorVincent Povirk <vincent@codeweavers.com>
Sat, 12 Dec 2009 23:13:39 +0000 (12 17:13 -0600)
committerAlexandre Julliard <julliard@winehq.org>
Mon, 14 Dec 2009 11:18:10 +0000 (14 12:18 +0100)
tree9c0eef47f9446bcda60b8524787931e3e948a736
parent9823c23927bb745c887218156db70b4c41c486ea
gdiplus: Explicitly copy the bits from dib sections to new bitmaps.

On Windows, GdipCreateBitmapFromHBITMAP creates a copy of the bitmap, not
a reference. Currently, we match this behavior, but this is only because
we cannot yet create bitmap objects that reference existing memory. If
GdipCreateBitmapFromScan0 were fixed to do this, FromHBITMAP would break.

Therefore, we always pass NULL to FromScan0 so that it allocates new memory
for the bitmap.
dlls/gdiplus/image.c
dlls/gdiplus/tests/image.c