Commit 375d93a1 authored by Jeff Smith's avatar Jeff Smith Committed by Alexandre Julliard

gdiplus/tests: Add test for non-square icon with GdipCreateBitmapFromHICON.

parent c5ae02c6
......@@ -1668,6 +1668,28 @@ static void test_fromhicon(void)
GdipDisposeImage((GpImage*)bitmap);
}
DestroyIcon(hIcon);
/* non-square 32 bpp icon */
hbmMask = CreateBitmap(16, 8, 1, 1, bmp_bits);
ok(hbmMask != 0, "CreateBitmap failed\n");
hbmColor = CreateBitmap(16, 8, 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, 8, __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