Commit 07ee528e authored by Ulrich Czekalla's avatar Ulrich Czekalla Committed by Alexandre Julliard

When loading a bitmap into a dibsection the result cannot be

compressed.
parent 0e1252a8
...@@ -2131,6 +2131,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, UINT loadflags ) ...@@ -2131,6 +2131,7 @@ static HBITMAP BITMAP_Load( HINSTANCE instance, LPCWSTR name, UINT loadflags )
if (loadflags & LR_CREATEDIBSECTION) { if (loadflags & LR_CREATEDIBSECTION) {
DIBSECTION dib; DIBSECTION dib;
fix_info->bmiHeader.biCompression = 0; /* DIBSection can't be compressed */
hbitmap = CreateDIBSection(screen_dc, fix_info, DIB_RGB_COLORS, NULL, 0, 0); hbitmap = CreateDIBSection(screen_dc, fix_info, DIB_RGB_COLORS, NULL, 0, 0);
GetObjectA(hbitmap, sizeof(DIBSECTION), &dib); GetObjectA(hbitmap, sizeof(DIBSECTION), &dib);
SetDIBits(screen_dc, hbitmap, 0, dib.dsBm.bmHeight, bits, info, SetDIBits(screen_dc, hbitmap, 0, dib.dsBm.bmHeight, bits, info,
......
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