Commit c5ae02c6 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

gdiplus/tests: Add test for 32 bpp icon with GdipCreateBitmapFromHICON.

parent 909ff728
......@@ -1646,6 +1646,28 @@ static void test_fromhicon(void)
GdipDisposeImage((GpImage*)bitmap);
}
DestroyIcon(hIcon);
/* 32 bpp icon */
hbmMask = CreateBitmap(16, 16, 1, 1, bmp_bits);
ok(hbmMask != 0, "CreateBitmap failed\n");
hbmColor = CreateBitmap(16, 16, 1, 32, bmp_bits);
ok(hbmColor != 0, "CreateBitmap failed\n");
info = iconinfo_base;
info.hbmMask = hbmMask;
info.hbmColor = hbmColor;
hIcon = CreateIconIndirect(&info);
ok(hIcon != 0, "CreateIconIndirect failed\n");
DeleteObject(hbmMask);
DeleteObject(hbmColor);
stat = GdipCreateBitmapFromHICON(hIcon, &bitmap);
expect(Ok, stat);
if(stat == Ok){
expect_image_properties((GpImage*)bitmap, 16, 16, __LINE__);
expect_rawformat(&ImageFormatMemoryBMP, (GpImage*)bitmap, __LINE__, FALSE);
GdipDisposeImage((GpImage*)bitmap);
}
DestroyIcon(hIcon);
}
/* 1x1 pixel png */
......
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