38DEFINE_GUID(BlurEffectGuid, 0x633c80a4, 0x1843, 0x482b, 0x9e, 0xf2, 0xbe, 0x28, 0x34, 0xc5, 0xfd, 0xd4);
39DEFINE_GUID(SharpenEffectGuid, 0x63cbf3ee, 0xc526, 0x402c, 0x8f, 0x71, 0x62, 0xc5, 0x40, 0xbf, 0x51, 0x42);
40DEFINE_GUID(ColorMatrixEffectGuid, 0x718f2615, 0x7933, 0x40e3, 0xa5, 0x11, 0x5f, 0x68, 0xfe, 0x14, 0xdd, 0x74);
41DEFINE_GUID(ColorLUTEffectGuid, 0xa7ce72a9, 0x0f7f, 0x40d7, 0xb3, 0xcc, 0xd0, 0xc0, 0x2d, 0x5c, 0x32, 0x12);
42DEFINE_GUID(BrightnessContrastEffectGuid, 0xd3a1dbe1, 0x8ec4, 0x4c17, 0x9f, 0x4c, 0xea, 0x97, 0xad, 0x1c, 0x34, 0x3d);
43DEFINE_GUID(HueSaturationLightnessEffectGuid, 0x8b2dd6c3, 0xeb07, 0x4d87, 0xa5, 0xf0, 0x71, 0x08, 0xe2, 0x6a, 0x9c, 0x5f);
44DEFINE_GUID(LevelsEffectGuid, 0x99c354ec, 0x2a31, 0x4f3a, 0x8c, 0x34, 0x17, 0xa8, 0x03, 0xb3, 0x3a, 0x25);
45DEFINE_GUID(TintEffectGuid, 0x1077af00, 0x2848, 0x4441, 0x94, 0x89, 0x44, 0xad, 0x4c, 0x2d, 0x7a, 0x2c);
46DEFINE_GUID(ColorBalanceEffectGuid, 0x537e597d, 0x251e, 0x48da, 0x96, 0x64, 0x29, 0xca, 0x49, 0x6b, 0x70, 0xf8);
47DEFINE_GUID(RedEyeCorrectionEffectGuid, 0x74d29d05, 0x69a4, 0x4266, 0x95, 0x49, 0x3c, 0xc5, 0x28, 0x36, 0xb6, 0x32);
48DEFINE_GUID(ColorCurveEffectGuid, 0xdd6a0022, 0x58e4, 0x4a67, 0x9d, 0x9b, 0xd4, 0x8e, 0xb8, 0x81, 0xa5, 0x3d);
56#define expect(expected, got) ok((got) == (expected), "Expected %d, got %d\n", (UINT)(expected), (UINT)(got))
57#define expectf(expected, got) ok(fabs((expected) - (got)) < 0.0001, "Expected %f, got %f\n", (expected), (got))
61 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
63 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
65 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
67 if (
abs((c1 & 0xff) - (c2 & 0xff)) > max_diff)
return FALSE;
115 ok_(__FILE__,
line)(
stat ==
Ok,
"Failed to create a Bitmap\n");
136 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
143 ok( !bm,
"expected null bitmap\n" );
148 ok( !bm,
"expected null bitmap\n" );
153 ok( !bm,
"expected null bitmap\n" );
158 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
165 ok( !bm,
"expected null bitmap\n" );
170 ok( bm == (
GpBitmap*)0xdeadbeef,
"expected deadbeef bitmap\n" );
175 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
182 ok( !bm,
"expected null bitmap\n" );
196 memset(rbmi, 0,
sizeof(rbmi));
216 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
229 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
242 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
255 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
268 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
281 ok(
NULL != bm,
"Expected bitmap to be initialized\n");
306 ok((
GpBitmap*)0xdeadbeef != bm,
"Expected bitmap to not be 0xdeadbeef\n");
307 ok(
NULL != bm,
"Expected bitmap to not be NULL\n");
333 GUID dimension = {0};
340 ok((
GpBitmap*)0xdeadbeef != bm,
"Expected bitmap to not be 0xdeadbeef\n");
341 ok(
NULL != bm,
"Expected bitmap to not be NULL\n");
401 static const WCHAR nonexistentW[] = {
'n',
'o',
'n',
'e',
'x',
'i',
's',
't',
'e',
'n',
't',0};
409 ok(bm == (
GpBitmap *)0xdeadbeef,
"returned %p\n", bm);
414 ok(!bm,
"returned %p\n", bm);
541 for (
i = 0;
i <
n;
i++)
556 ok(
FALSE,
"No BMP codec found.\n");
594 ((
char*)bd.
Scan0)[2] = 0xff;
679 ok(0xc3 != ((
BYTE*)bd.
Scan0)[2 + bd.
Stride * 5],
"original image bits are readable\n");
701 ok(0xc3 != ((
BYTE*)bd.
Scan0)[2 + bd.
Stride * 5],
"original image bits are readable\n");
719 ok(0xff != ((
BYTE*)bd.
Scan0)[2],
"original image bits are readable\n");
720 ok(0xc3 != ((
BYTE*)bd.
Scan0)[2 + bd.
Stride * 5],
"original image bits are readable\n");
777 ((
char*)bd.
Scan0)[2] = 0xff;
899 HPALETTE hpal =
NULL;
904 const REAL WIDTH1 = 5;
905 const REAL HEIGHT1 = 15;
906 const REAL WIDTH2 = 10;
907 const REAL HEIGHT2 = 20;
944 ok(
hdc !=
NULL,
"CreateCompatibleDC failed\n");
954 ok(
hbm !=
NULL,
"CreateDIBSection failed\n");
975 ok(LogPal !=
NULL,
"unable to allocate LOGPALETTE\n");
979 ok(hpal !=
NULL,
"CreatePalette failed\n");
996 ok(
hbm !=
NULL,
"CreateDIBSection failed\n");
1021 bmi.
bf.masks[0] = 0x7c00;
1022 bmi.
bf.masks[1] = 0x3e0;
1023 bmi.
bf.masks[2] = 0x1f;
1026 ok(
hbm !=
NULL,
"CreateDIBSection failed\n");
1049 bmi.
bf.masks[0] = 0xf800;
1050 bmi.
bf.masks[1] = 0x7e0;
1051 bmi.
bf.masks[2] = 0x1f;
1054 ok(
hbm !=
NULL,
"CreateDIBSection failed\n");
1246 ok(
param != 0,
"Build number expected, got %u\n",
param);
1251 static const BYTE bmp_bits[1024];
1269 ok(hbmMask != 0,
"CreateBitmap failed\n");
1271 ok(hbmColor != 0,
"CreateBitmap failed\n");
1275 info.hbmMask = hbmMask;
1276 info.hbmColor = hbmColor;
1278 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
1285 "Expected Ok, got %.8x\n",
stat);
1308 ok(hbmMask != 0,
"CreateBitmap failed\n");
1310 ok(hbmColor != 0,
"CreateBitmap failed\n");
1314 info.hbmMask = hbmMask;
1315 info.hbmColor = hbmColor;
1317 ok(
hIcon != 0,
"CreateIconIndirect failed\n");
13460x89,0x50,0x4e,0x47,0x0d,0x0a,0x1a,0x0a,0x00,0x00,0x00,0x0d,0x49,0x48,0x44,0x52,
13470x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,
13480xde,0x00,0x00,0x00,0x09,0x70,0x48,0x59,0x73,0x00,0x00,0x0b,0x13,0x00,0x00,0x0b,
13490x13,0x01,0x00,0x9a,0x9c,0x18,0x00,0x00,0x00,0x07,0x74,0x49,0x4d,0x45,0x07,0xd5,
13500x06,0x03,0x0f,0x07,0x2d,0x12,0x10,0xf0,0xfd,0x00,0x00,0x00,0x0c,0x49,0x44,0x41,
13510x54,0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,
13520xe7,0x00,0x00,0x00,0x00,0x49,0x45,0x4e,0x44,0xae,0x42,0x60,0x82
13560x47,0x49,0x46,0x38,0x37,0x61,0x01,0x00,0x01,0x00,0x80,0x00,0x00,0xff,0xff,0xff,
13570xff,0xff,0xff,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,
13620x47,0x49,0x46,0x38,0x39,0x61,0x01,0x00,0x01,0x00,0xf0,0x00,0x00,0x00,0x00,0x00,
13630x00,0x00,0x00,0x21,0xf9,0x04,0x01,0x00,0x00,0x00,0x00,0x2c,0x00,0x00,0x00,0x00,
13640x01,0x00,0x01,0x00,0x00,0x02,0x02,0x44,0x01,0x00,0x3b
13680x42,0x4d,0x42,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x3e,0x00,0x00,0x00,0x28,0x00,
13690x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x00,
13700x00,0x00,0x04,0x00,0x00,0x00,0x12,0x0b,0x00,0x00,0x12,0x0b,0x00,0x00,0x02,0x00,
13710x00,0x00,0x02,0x00,0x00,0x00,0xff,0xff,0xff,0x00,0xff,0xff,0xff,0x00,0x00,0x00,
13760xff,0xd8,0xff,0xe0,0x00,0x10,0x4a,0x46,0x49,0x46,0x00,0x01,0x01,0x01,0x01,0x2c,
13770x01,0x2c,0x00,0x00,0xff,0xdb,0x00,0x43,0x00,0x05,0x03,0x04,0x04,0x04,0x03,0x05,
13780x04,0x04,0x04,0x05,0x05,0x05,0x06,0x07,0x0c,0x08,0x07,0x07,0x07,0x07,0x0f,0x0b,
13790x0b,0x09,0x0c,0x11,0x0f,0x12,0x12,0x11,0x0f,0x11,0x11,0x13,0x16,0x1c,0x17,0x13,
13800x14,0x1a,0x15,0x11,0x11,0x18,0x21,0x18,0x1a,0x1d,0x1d,0x1f,0x1f,0x1f,0x13,0x17,
13810x22,0x24,0x22,0x1e,0x24,0x1c,0x1e,0x1f,0x1e,0xff,0xdb,0x00,0x43,0x01,0x05,0x05,
13820x05,0x07,0x06,0x07,0x0e,0x08,0x08,0x0e,0x1e,0x14,0x11,0x14,0x1e,0x1e,0x1e,0x1e,
13830x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
13840x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,
13850x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0x1e,0xff,0xc0,
13860x00,0x11,0x08,0x00,0x01,0x00,0x01,0x03,0x01,0x22,0x00,0x02,0x11,0x01,0x03,0x11,
13870x01,0xff,0xc4,0x00,0x15,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
13880x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08,0xff,0xc4,0x00,0x14,0x10,0x01,0x00,0x00,
13890x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xc4,
13900x00,0x14,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
13910x00,0x00,0x00,0x00,0xff,0xc4,0x00,0x14,0x11,0x01,0x00,0x00,0x00,0x00,0x00,0x00,
13920x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xda,0x00,0x0c,0x03,0x01,
13930x00,0x02,0x11,0x03,0x11,0x00,0x3f,0x00,0xb2,0xc0,0x07,0xff,0xd9
13970x49,0x49,0x2a,0x00,0x0c,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x10,0x00,0xfe,0x00,
13980x04,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x03,0x00,0x01,0x00,
13990x00,0x00,0x01,0x00,0x00,0x00,0x01,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,
14000x00,0x00,0x02,0x01,0x03,0x00,0x03,0x00,0x00,0x00,0xd2,0x00,0x00,0x00,0x03,0x01,
14010x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x06,0x01,0x03,0x00,0x01,0x00,
14020x00,0x00,0x02,0x00,0x00,0x00,0x0d,0x01,0x02,0x00,0x1b,0x00,0x00,0x00,0xd8,0x00,
14030x00,0x00,0x11,0x01,0x04,0x00,0x01,0x00,0x00,0x00,0x08,0x00,0x00,0x00,0x12,0x01,
14040x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x15,0x01,0x03,0x00,0x01,0x00,
14050x00,0x00,0x03,0x00,0x00,0x00,0x16,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x40,0x00,
14060x00,0x00,0x17,0x01,0x04,0x00,0x01,0x00,0x00,0x00,0x03,0x00,0x00,0x00,0x1a,0x01,
14070x05,0x00,0x01,0x00,0x00,0x00,0xf4,0x00,0x00,0x00,0x1b,0x01,0x05,0x00,0x01,0x00,
14080x00,0x00,0xfc,0x00,0x00,0x00,0x1c,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x01,0x00,
14090x00,0x00,0x28,0x01,0x03,0x00,0x01,0x00,0x00,0x00,0x02,0x00,0x00,0x00,0x00,0x00,
14100x00,0x00,0x08,0x00,0x08,0x00,0x08,0x00,0x2f,0x68,0x6f,0x6d,0x65,0x2f,0x6d,0x65,
14110x68,0x2f,0x44,0x65,0x73,0x6b,0x74,0x6f,0x70,0x2f,0x74,0x65,0x73,0x74,0x2e,0x74,
14120x69,0x66,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x48,
14170xd7,0xcd,0xc6,0x9a,0x00,0x00,0x00,0x00,0x00,0x00,0x40,0x01,0x40,0x01,0xa0,0x05,
14180x00,0x00,0x00,0x00,0xb1,0x52,0x01,0x00,0x09,0x00,0x00,0x03,0x4f,0x00,0x00,0x00,
14190x0f,0x00,0x08,0x00,0x00,0x00,0x00,0x00,0x05,0x00,0x00,0x00,0x0b,0x02,0x00,0x00,
14200x00,0x00,0x05,0x00,0x00,0x00,0x0c,0x02,0x40,0x01,0x40,0x01,0x04,0x00,0x00,0x00,
14210x02,0x01,0x01,0x00,0x04,0x00,0x00,0x00,0x04,0x01,0x0d,0x00,0x08,0x00,0x00,0x00,
14220xfa,0x02,0x05,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,
14230x2d,0x01,0x00,0x00,0x07,0x00,0x00,0x00,0xfc,0x02,0x01,0x00,0x00,0x00,0x00,0x00,
14240x00,0x00,0x04,0x00,0x00,0x00,0x2d,0x01,0x01,0x00,0x07,0x00,0x00,0x00,0xfc,0x02,
14250x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x04,0x00,0x00,0x00,0x2d,0x01,0x02,0x00,
14260x07,0x00,0x00,0x00,0x1b,0x04,0x40,0x01,0x40,0x01,0x00,0x00,0x00,0x00,0x04,0x00,
14270x00,0x00,0xf0,0x01,0x00,0x00,0x04,0x00,0x00,0x00,0xf0,0x01,0x01,0x00,0x03,0x00,
1459 ok(
hres ==
S_OK,
"Failed to create a stream\n");
1463 ok(
stat ==
Ok,
"Failed to create a Bitmap\n");
1523 ok(hwmf != 0,
"SetMetaFileBitsEx failed\n");
1577 ok(hwmf != 0,
"SetMetaFileBitsEx failed\n");
1592 int screenxres, screenyres;
1618 screendc =
GetDC(0);
1716 expect(40, bm.bmWidthBytes);
1718 expect(32, bm.bmBitsPixel);
1719 ok(bm.bmBits !=
NULL,
"got DDB, expected DIB\n");
1724 ok(
val == 0xff686868,
"got %x, expected 0xff686868\n",
val);
1763 expect(32, bm.bmWidthBytes);
1765 expect(32, bm.bmBitsPixel);
1766 ok(bm.bmBits !=
NULL,
"got DDB, expected DIB\n");
1771 ok(
val == 0x682a2a2a,
"got %x, expected 0x682a2a2a\n",
val);
1772 val = *((
DWORD*)bm.bmBits + (bm.bmHeight-1) * bm.bmWidthBytes/4 + 1);
1773 ok(
val == 0x0,
"got %x, expected 0x682a2a2a\n",
val);
1805 expect(32, bm.bmWidthBytes);
1807 expect(32, bm.bmBitsPixel);
1808 ok(bm.bmBits !=
NULL,
"got DDB, expected DIB\n");
1813 ok(
val == 0x68c12ac1 ||
broken(
val == 0x682a2ac1),
"got %x, expected 0x68c12ac1\n",
val);
1814 val = *((
DWORD*)bm.bmBits + (bm.bmHeight-1) * bm.bmWidthBytes/4 + 1);
1822 ok(pixel == 0xc12ac1 ||
broken(pixel == 0xc12a2a),
"got %x, expected 0xc12ac1\n", pixel);
1824 ok(pixel == 0xff00ff ||
broken(pixel == 0xff0000),
"got %x, expected 0xff00ff\n", pixel);
1826 ok(pixel == 0xb12ac1 ||
broken(pixel == 0xb12a2a),
"got %x, expected 0xb12ac1\n", pixel);
1845 expect(32, bm.bmWidthBytes);
1847 expect(32, bm.bmBitsPixel);
1848 ok(bm.bmBits !=
NULL,
"got DDB, expected DIB\n");
1853 ok(
val == 0x68c12ac1 ||
broken(
val == 0x682a2ac1),
"got %x, expected 0x68c12ac1\n",
val);
1854 val = *((
DWORD*)bm.bmBits + (bm.bmHeight-1) * bm.bmWidthBytes/4 + 1);
1862 ok(pixel == 0xc12ac1 ||
broken(pixel == 0xc12a2a),
"got %x, expected 0xc12ac1\n", pixel);
1864 ok(pixel == 0xff00ff ||
broken(pixel == 0xff0000),
"got %x, expected 0xff00ff\n", pixel);
1866 ok(pixel == 0xb12ac1 ||
broken(pixel == 0xb12a2a),
"got %x, expected 0xb12ac1\n", pixel);
1881 memset(&lockeddata, 0,
sizeof(lockeddata));
1978 BYTE bits[16] = {0x00,0x00,0x00,0x00, 0x00,0xff,0xff,0x00,
1979 0xff,0x00,0x00,0x00, 0xff,0xff,0xff,0x00};
2004 "Expected InvalidParameter, got %.8x\n",
stat);
2011 "Expected InvalidParameter, got %.8x\n",
stat);
2055 static const BYTE halftone_values[6]={0x00,0x33,0x66,0x99,0xcc,0xff};
2084 expected |= halftone_values[((
i-40)/6)%6] << 8;
2085 expected |= halftone_values[((
i-40)/36)%6] << 16;
2143 expect(0xff000000, entries[0]);
2144 expect(0xffffffff, entries[1]);
2229 entries[1] = 0xffcccccc;
2244 expect(0xffcccccc, entries[1]);
2254 entries[3] = 0xdeadbeef;
2264 expect(0xffcccccc, entries[1]);
2265 expect(0xdeadbeef, entries[3]);
2284 {1.0,0.0,0.0,0.0,0.0},
2285 {0.0,1.0,0.0,0.0,0.0},
2286 {0.0,0.0,1.0,0.0,0.0},
2287 {0.0,0.0,0.0,1.0,0.0},
2288 {0.0,0.0,0.0,0.0,1.0}}};
2290 {2.0,0.0,0.0,0.0,0.0},
2291 {0.0,1.0,0.0,0.0,0.0},
2292 {0.0,0.0,1.0,0.0,0.0},
2293 {0.0,0.0,0.0,1.0,0.0},
2294 {0.0,0.0,0.0,0.0,1.0}}};
2296 {0.0,1.0,0.0,0.0,0.0},
2297 {0.0,0.0,1.0,0.0,0.0},
2298 {0.0,0.0,0.0,1.0,0.0},
2299 {1.0,0.0,0.0,0.0,0.0},
2300 {0.0,0.0,0.0,0.0,1.0}}};
2340 TRUE, &colormatrix, &graymatrix, 3);
2356 colormatrix = double_red;
2373 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,1,1, 0,0,1,1,
2381 colormatrix = asymmetric;
2389 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,1,1, 0,0,1,1,
2401 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2412 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2426 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2434 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2450 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2461 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2477 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2493 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2504 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2518 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2529 stat =
GdipDrawImageRectRectI(graphics, (
GpImage *)bitmap1, 0, 0, 1, 1, 0, 0, 1, 1,
2591 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,1,1, 0,0,1,1,
2602 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,1,1, 0,0,1,1,
26180x47,0x49,0x46,0x38,0x39,0x61,0x01,0x00,0x01,0x00,0xa1,0x00,0x00,0x00,0x00,0x00,
26190xff,0xff,0xff,0x00,0x00,0x00,0x00,0x00,0x00,0x21,0xf9,0x04,0x00,0x0a,0x00,0xff,
26200x00,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x00,0x02,0x02,0x4c,0x01,0x00,
26210x21,0xf9,0x04,0x01,0x0a,0x00,0x01,0x00,0x2c,0x00,0x00,0x00,0x00,0x01,0x00,0x01,
26220x00,0x00,0x02,0x02,0x44,0x01,0x00,0x3b
2634 0x47, 0x49, 0x46, 0x38, 0x39, 0x61, 0x08, 0x00,
2635 0x02, 0x00, 0xf0, 0x00, 0x00, 0x00, 0x00, 0x00,
2636 0x00, 0x00, 0x00, 0x21, 0xf9, 0x04, 0x01, 0x64,
2637 0x00, 0x00, 0x00, 0x21, 0xff, 0x0b, 0x4e, 0x45,
2638 0x54, 0x53, 0x43, 0x41, 0x50, 0x45, 0x32, 0x2e,
2639 0x30, 0x03, 0x01, 0x00, 0x00, 0x00, 0x2c, 0x00,
2640 0x00, 0x00, 0x00, 0x08, 0x00, 0x02, 0x00, 0x00,
2641 0x02, 0x04, 0x84, 0x8f, 0x09, 0x05, 0x00, 0x21,
2642 0xf9, 0x04, 0x04, 0x64, 0x00, 0x00, 0x00, 0x2c,
2643 0x00, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00,
2644 0x81, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00, 0xff,
2645 0x00, 0x00, 0xff, 0x00, 0x00, 0x02, 0x03, 0x44,
2646 0x34, 0x05, 0x00, 0x21, 0xf9, 0x04, 0x08, 0x64,
2647 0x00, 0x00, 0x00, 0x2c, 0x02, 0x00, 0x00, 0x00,
2648 0x02, 0x00, 0x02, 0x00, 0x81, 0x00, 0x00, 0xff,
2649 0x00, 0x00, 0xff, 0x00, 0x00, 0xff, 0x00, 0x00,
2650 0xff, 0x02, 0x03, 0x44, 0x34, 0x05, 0x00, 0x21,
2651 0xf9, 0x04, 0x0c, 0x64, 0x00, 0x00, 0x00, 0x2c,
2652 0x04, 0x00, 0x00, 0x00, 0x02, 0x00, 0x02, 0x00,
2653 0x81, 0x00, 0x80, 0x00, 0x00, 0x80, 0x00, 0x00,
2654 0x80, 0x00, 0x00, 0x80, 0x00, 0x02, 0x03, 0x44,
2655 0x34, 0x05, 0x00, 0x21, 0xf9, 0x04, 0x00, 0x64,
2656 0x00, 0x00, 0x00, 0x2c, 0x06, 0x00, 0x00, 0x00,
2657 0x02, 0x00, 0x02, 0x00, 0x80, 0x7e, 0x7e, 0x7e,
2658 0x00, 0x00, 0x00, 0x02, 0x02, 0x84, 0x51, 0x00,
2664 {0xffff0000, 0, 0, 0},
2665 {0xffff0000, 0xff0000ff, 0, 0},
2666 {0xffff0000, 0, 0xff008000, 0},
2667 {0xffff0000, 0, 0, 0xff7e7e7e}
2683 char palette_buf[256];
2685 ARGB *palette_entries;
2694 ok(
hres ==
S_OK,
"Failed to create a stream\n");
2698 ok(
stat ==
Ok,
"Failed to create a Bitmap\n");
2795 ok(
hres ==
S_OK,
"Failed to create a stream\n");
2799 ok(
stat ==
Ok,
"Failed to create a Bitmap\n");
2833 ok(
hres ==
S_OK,
"Failed to create a stream\n");
2837 ok(
stat ==
Ok,
"Failed to create a Bitmap\n");
2852 memset(palette_buf, 0xfe,
sizeof(palette_buf));
2856 palette_entries =
palette->Entries;
2860 expect(0, palette_entries[0]);
2861 expect(0xff000000, palette_entries[1]);
2877 ok(
hres ==
S_OK,
"Failed to create a stream\n");
2880 ok(
stat ==
Ok,
"Failed to create a Bitmap\n");
2901 win_skip(
"broken animated gif support\n");
2906 for(
i=0;
i<6;
i++) {
2910 for(
j=0;
j<4;
j++) {
2925 static const BYTE orig_bits[24] = {
2926 0,0,0xff, 0,0xff,0, 0xff,0,0, 23,23,23,
2927 0xff,0xff,0, 0xff,0,0xff, 0,0xff,0xff, 23,23,23};
3051 map->oldColor.Argb = 0xff00ff00;
3052 map->newColor.Argb = 0xffff00ff;
3090 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,1,1, 0,0,1,1,
3101 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,1,1, 0,0,1,1,
3160 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,2,2, 0,0,2,2,
3183 stat =
GdipDrawImageRectRectI(graphics, (
GpImage*)bitmap1, 0,0,2,2, 0,0,2,2,
3214 char invalid_image[256];
3228 memset(invalid_image, 0, 256);
3248 LONG refcount, old_refcount;
3256 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal error %#x\n",
hr);
3260 ok(refcount == 1,
"expected stream refcount 1, got %d\n", refcount);
3266 "GdipLoadImageFromStream error %d\n",
status);
3268 ok(
status !=
Ok,
"GdipLoadImageFromStream should fail\n");
3280 ok(refcount > 1,
"expected stream refcount > 1, got %d\n", refcount);
3282 ok(refcount == 1,
"expected stream refcount 1, got %d\n", refcount);
3283 old_refcount = refcount;
3288 ok(refcount == old_refcount,
"expected stream refcount %d, got %d\n", old_refcount, refcount);
3292 ok(refcount == old_refcount,
"expected stream refcount %d, got %d\n", old_refcount, refcount);
3294 refcount = IStream_Release(
stream);
3296 ok(refcount >= 1,
"expected stream refcount != 0\n");
3298 ok(refcount == 0,
"expected stream refcount 0, got %d\n", refcount);
3307 const BYTE *image_data;
3328 UINT prop_count, prop_size,
i;
3329 PROPID prop_id[16] = { 0 };
3342 trace(
"%u: failed to load image data\n",
i);
3348 ok(td[
i].image_type == image_type,
"%u: expected image_type %d, got %d\n",
3349 i, td[
i].image_type, image_type);
3354 ok(td[
i].prop_count == prop_count || td[
i].prop_count2 == prop_count,
3355 " %u: expected property count %u or %u, got %u\n",
3356 i, td[
i].prop_count, td[
i].prop_count2, prop_count);
3379 if (td[
i].prop_count != prop_count)
3392 else if (prop_count == 0)
3412 if (prop_count != 0)
3413 ok(td[
i].prop_id == prop_id[0] || td[
i].prop_id2 == prop_id[0],
3414 " %u: expected property id %#x or %#x, got %#x\n",
3415 i, td[
i].prop_id, td[
i].prop_id2, prop_id[0]);
3421 if (prop_count == 0)
3428 ok(prop_size >
sizeof(
PropertyItem),
"%u: got too small prop_size %u\n",
3432 " %u: expected property size %u or %u, got %u\n",
3433 i, td[
i].prop_size, td[
i].prop_size2, prop_size);
3437 "%u: expected InvalidParameter, got %d\n",
i,
status);
3440 "%u: expected InvalidParameter, got %d\n",
i,
status);
3443 "%u: expected InvalidParameter, got %d\n",
i,
status);
3446 ok(prop_id[0] ==
item.data.id,
3447 "%u: expected property id %#x, got %#x\n",
i, prop_id[0],
item.data.id);
3459#define IFD_RATIONAL 5
3461#define IFD_UNDEFINED 7
3464#define IFD_SRATIONAL 10
3466#define IFD_DOUBLE 12
3468#ifndef PropertyTagTypeSByte
3469#define PropertyTagTypeSByte 6
3470#define PropertyTagTypeSShort 8
3471#define PropertyTagTypeFloat 11
3472#define PropertyTagTypeDouble 12
3483 default:
return type;
3487#include "pshpack2.h"
3521#ifdef WORDS_BIGENDIAN
3543 { 0xf001,
IFD_BYTE, 1, 0x11223344 },
3544 { 0xf002,
IFD_BYTE, 4, 0x11223344 },
3556 { 0xf00f,
IFD_ASCII, 4,
'a' |
'b' << 8 |
'c' << 16 |
'd' << 24 },
3558 { 0xf011,
IFD_UNDEFINED, 4,
'a' |
'b' << 8 |
'c' << 16 |
'd' << 24 },
3570 1234567890.0987654321,
3571 { 0x1a2b3c4d, 0x5a6b7c8d },
3573 { 0x0101, 0x0202, 0x0303, 0x0404 },
3574 { 0x11223344, 0x55667788 },
3576 { { 0x01020304, 0x05060708 }, { 0x10203040, 0x50607080 }, { 0x11223344, 0x55667788 } },
3577 { 0x11, 0x22, 0x33, 0 }
3609 {
PropertyTagTypeDouble, 0xf008, 8, { 0x2c,0x52,0x86,0xb4,0x80,0x65,0xd2,0x41 } },
3610 {
PropertyTagTypeSRational, 0xf009, 8, { 0x4d, 0x3c, 0x2b, 0x1a, 0x8d, 0x7c, 0x6b, 0x5a } },
3611 {
PropertyTagTypeByte, 0xf00a, 13, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0 } },
3612 {
PropertyTagTypeSShort, 0xf00b, 8, { 0x01,0x01,0x02,0x02,0x03,0x03,0x04,0x04 } },
3613 {
PropertyTagTypeSLONG, 0xf00c, 8, { 0x44,0x33,0x22,0x11,0x88,0x77,0x66,0x55 } },
3614 {
PropertyTagTypeASCII, 0xf00e, 13, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0 } },
3616 {
PropertyTagTypeUndefined, 0xf010, 13, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0 } },
3619 { 0x04,0x03,0x02,0x01,0x08,0x07,0x06,0x05,
3620 0x40,0x30,0x20,0x10,0x80,0x70,0x60,0x50,
3621 0x44,0x33,0x22,0x11,0x88,0x77,0x66,0x55 } },
3623 {
PropertyTagTypeFloat, 0xf017, 8, { 0x2b,0x52,0x9a,0x44,0xba,0xf5,0x08,0x46 } },
3628 UINT dim_count, frame_count, prop_count, prop_size,
i;
3635 win_skip(
"Failed to load TIFF image data. Might not be supported. Skipping.\n");
3647 frame_count = 0xdeadbeef;
3652 prop_count = 0xdeadbeef;
3657 "expected property count %u, got %u\n", (
UINT)
ARRAY_SIZE(td), prop_count);
3664 for (
i = 0;
i < prop_count;
i++)
3669 ok(prop_size >
sizeof(*prop_item),
"%u: too small item length %u\n",
i, prop_size);
3674 ok(prop_item->
value == prop_item + 1,
"expected item->value %p, got %p\n", prop_item + 1, prop_item->
value);
3680 "%u: expected type %u, got %u\n",
i, td[
i].
type, prop_item->
type);
3681 ok(td[
i].
id == prop_item->
id,
"%u: expected id %#x, got %#x\n",
i, td[
i].id, prop_item->
id);
3682 prop_size -=
sizeof(*prop_item);
3683 ok(prop_item->
length == prop_size,
"%u: expected length %u, got %u\n",
i, prop_size, prop_item->
length);
3685 "%u: expected length %u, got %u\n",
i, td[
i].length, prop_item->
length);
3687 "%u: expected length %u, got %u\n",
i, td[
i].
length, prop_size);
3696 trace(
"id %#x:", prop_item->
id);
3730 {
PropertyTagTypeRational, 0x11a, 8, { 0,0,0,72,0,0,0,1 } },
3731 {
PropertyTagTypeRational, 0x11b, 8, { 0,0,0,72,0,0,0,1 } },
3738 UINT dim_count, frame_count, prop_count, prop_size,
i;
3739 UINT total_size, total_count;
3742 const char *item_data;
3745 ok(
image != 0,
"Failed to load TIFF image data\n");
3748 dim_count = 0xdeadbeef;
3757 frame_count = 0xdeadbeef;
3762 prop_count = 0xdeadbeef;
3766 "expected property count %u, got %u\n", (
UINT)
ARRAY_SIZE(td), prop_count);
3774 for (
i = 0;
i < prop_count;
i++)
3780 ok(
size >
sizeof(*prop_item),
"%u: too small item length %u\n",
i,
size);
3787 ok(prop_item->
value == prop_item + 1,
"expected item->value %p, got %p\n", prop_item + 1, prop_item->
value);
3789 "%u: expected type %u, got %u\n",
i, td[
i].type, prop_item->
type);
3790 ok(td[
i].
id == prop_item->
id,
"%u: expected id %#x, got %#x\n",
i, td[
i].id, prop_item->
id);
3791 size -=
sizeof(*prop_item);
3793 ok(td[
i].
length == prop_item->
length,
"%u: expected length %u, got %u\n",
i, td[
i].length, prop_item->
length);
3797 ok(
match,
"%u: data mismatch\n",
i);
3802 trace(
"id %#x:", prop_item->
id);
3821 total_size = 0xdeadbeef;
3822 total_count = 0xdeadbeef;
3825 ok(prop_count == total_count,
3826 "expected total property count %u, got %u\n", prop_count, total_count);
3827 ok(prop_size == total_size,
3828 "expected total property size %u, got %u\n", prop_size, total_size);
3847 item_data = (
const char *)(prop_item + prop_count);
3848 for (
i = 0;
i < prop_count;
i++)
3850 ok(prop_item[
i].
value == item_data,
"%u: expected value %p, got %p\n",
3851 i, item_data, prop_item[
i].
value);
3853 "%u: expected type %u, got %u\n",
i, td[
i].
type, prop_item[
i].
type);
3854 ok(td[
i].
id == prop_item[
i].
id,
"%u: expected id %#x, got %#x\n",
i, td[
i].
id, prop_item[
i].
id);
3859 ok(
match,
"%u: data mismatch\n",
i);
3864 trace(
"id %#x:", prop_item[
i].
id);
3870 item_data += prop_item[
i].
length;
3895 win_skip(
"Failed to load TIFF image data. Might not be supported. Skipping.\n");
3905 "GdipGetImagePaletteSize error %d\n",
status);
3919 ok(entries[0] == 0xff000000,
"expected 0xff000000, got %#x\n", entries[0]);
3920 ok(entries[1] == 0xffffffff,
"expected 0xffffffff, got %#x\n", entries[1]);
3929 static const BYTE pixels_24[48] =
3931 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0,
3932 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0,
3933 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0,
3934 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0
3936 static const BYTE pixels_00[48] =
3938 0,0,0, 0,0,0, 0,0,0, 0,0,0,
3939 0,0,0, 0,0,0, 0,0,0, 0,0,0,
3940 0,0,0, 0,0,0, 0,0,0, 0,0,0,
3941 0,0,0, 0,0,0, 0,0,0, 0,0,0
3943 static const BYTE pixels_24_77[64] =
3945 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0,
3946 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0,
3947 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3948 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0,
3949 0xff,0xff,0xff, 0,0,0, 0xff,0xff,0xff, 0,0,0,
3950 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77
3952 static const BYTE pixels_77[64] =
3954 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3955 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3956 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3957 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3958 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3959 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3960 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3961 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77
3963 static const BYTE pixels_8[16] =
3965 0x01,0,0x01,0,0x01,0,0x01,0,
3966 0x01,0,0x01,0,0x01,0,0x01,0
3968 static const BYTE pixels_8_77[64] =
3970 0x01,0,0x01,0,0x01,0,0x01,0,
3971 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3972 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3973 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3974 0x01,0,0x01,0,0x01,0,0x01,0,
3975 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3976 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3977 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77
3979 static const BYTE pixels_1_77[64] =
3981 0xaa,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3982 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3983 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3984 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3985 0xaa,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3986 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3987 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77,
3988 0x77,0x77,0x77,0x77,0x77,0x77,0x77,0x77
3990 static const BYTE pixels_1[8] = {0xaa,0,0,0,0xaa,0,0,0};
3998 const BYTE *pixels_unlocked;
4050 entries[0] = 0xff000000;
4051 entries[1] = 0xffffffff;
4069 ok(
data.Width == 8,
"%u: expected 8, got %d\n",
i,
data.Width);
4070 ok(
data.Height == 2,
"%u: expected 2, got %d\n",
i,
data.Height);
4071 ok(td[
i].
stride ==
data.Stride,
"%u: expected %d, got %d\n",
i, td[
i].stride,
data.Stride);
4072 ok(td[
i].
format ==
data.PixelFormat,
"%u: expected %d, got %d\n",
i, td[
i].format,
data.PixelFormat);
4075 ok(
data.Scan0 ==
buf,
"%u: got wrong buffer\n",
i);
4081 for (
j = 0;
j <
data.Height;
j++)
4092 "%u: data should match\n",
i);
4096 trace(
"%u: data mismatch for format %#x:",
i, td[
i].
format);
4097 for (
j = 0;
j < td[
i].size;
j++)
4103 ok(!
match,
"%u: data shouldn't match\n",
i);
4114 ok(
data.Width == 8,
"%u: expected 8, got %d\n",
i,
data.Width);
4115 ok(
data.Height == 2,
"%u: expected 2, got %d\n",
i,
data.Height);
4116 ok(
data.Stride == 24,
"%u: expected 24, got %d\n",
i,
data.Stride);
4118 ok(
data.Height *
data.Stride == 48,
"%u: expected 48, got %d\n",
i,
data.Height *
data.Stride);
4119 if (
data.Height *
data.Stride == 48)
4122 ok(
match,
"%u: data should match\n",
i);
4127 trace(
"%u: data mismatch for format %#x:",
i, td[
i].
format);
4128 for (
j = 0;
j < 48;
j++)
4144 BYTE black_1x1[4] = { 0,0,0,0 };
4145 BYTE white_2x2[16] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
4146 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff };
4147 BYTE black_2x2[16] = { 0,0,0,0,0,0,0xff,0xff,
4148 0,0,0,0,0,0,0xff,0xff };
4175 match =
memcmp(white_2x2, black_2x2,
sizeof(black_2x2)) == 0;
4176 ok(
match,
"data should match\n");
4196 DWORD dst_pixels[4] = { 0xffffffff, 0xffffffff,
4197 0xffffffff, 0xffffffff };
4198 DWORD src_pixels[4] = { 0, 0xffff0000,
4226 expect(0xffff0000, dst_pixels[1]);
4240 BYTE black_1x1[4] = { 0,0,0,0 };
4241 BYTE white_2x2[16] = { 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff,
4242 0xff,0xff,0xff,0xff,0xff,0xff,0xff,0xff };
4243 BYTE black_2x2[16] = { 0,0,0,0,0,0,0xff,0xff,
4244 0,0,0,0,0,0,0xff,0xff };
4271 match =
memcmp(white_2x2, black_2x2,
sizeof(black_2x2)) == 0;
4272 ok(
match,
"data should match\n");
4313 "GdipCreateBitmapFromScan0 error %d\n",
status);
4331 expect(4, bm.bmWidthBytes);
4333 expect(32, bm.bmBitsPixel);
4341 "expected OutOfMemory, got %d\n",
status);
4349 "expected PixelFormat32bppPARGB, got %#x\n",
format);
4371 static const BYTE back_8x1[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,
4372 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4373 static const BYTE image_080[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40,
4374 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4375 static const BYTE image_100[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40,
4376 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4377 static const BYTE image_120[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x40,0x40,0x40,
4378 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4379 static const BYTE image_150[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,
4380 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4381 static const BYTE image_180[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,
4382 0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4383 static const BYTE image_200[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,
4384 0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4385 static const BYTE image_250[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,
4386 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40 };
4387 static const BYTE image_120_half[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
4388 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4389 static const BYTE image_150_half[24] = { 0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,
4390 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x40 };
4391 static const BYTE image_200_half[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,
4392 0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40,0x40,0x40,0x40 };
4393 static const BYTE image_250_half[24] = { 0x40,0x40,0x40,0x40,0x40,0x40,0x80,0x80,0x80,0x80,0x80,0x80,
4394 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x40,0x40,0x40 };
4435 BYTE src_2x1[6] = { 0x80,0x80,0x80,0x80,0x80,0x80 };
4472 memcpy(dst_8x1, back_8x1,
sizeof(dst_8x1));
4478 ok(
match,
"%d: data should match\n",
i);
4498'G',
'I',
'F',
'8',
'9',
'a',0x01,0x00,0x01,0x00,0xA1,0x02,0x00,
44990x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c,
45010x21,0xFF,0x0B,
'N',
'E',
'T',
'S',
'C',
'A',
'P',
'E',
'2',
'.',
'0',
45020x03,0x01,0x05,0x00,0x00,
45030x21,0xFE,0x0C,
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0x00,
45040x21,0x01,0x0D,
'a',
'n',
'i',
'm',
'a',
't',
'i',
'o',
'n',
'.',
'g',
'i',
'f',0x00,
45050x21,0xF9,0x04,0xff,0x0A,0x00,0x08,0x00,
45060x2C,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,
45070xa1,0xa2,0xa3,0xa4,0xa5,0xa6,0xa7,0xa8,0xa9,0xaa,0xab,0xac,
45080x02,0x02,0x4C,0x01,0x00,
45090x21,0xFE,0x08,
'i',
'm',
'a',
'g',
'e',
' ',
'#',
'1',0x00,
45100x21,0x01,0x0C,
'p',
'l',
'a',
'i',
'n',
't',
'e',
'x',
't',
' ',
'#',
'1',0x00,
45110x21,0xF9,0x04,0x00,0x14,0x00,0x01,0x00,
45120x2C,0x00,0x00,0x00,0x00,0x01,0x00,0x01,0x00,0x81,
45130xb1,0xb2,0xb3,0xb4,0xb5,0xb6,0xb7,0xb8,0xb9,0xba,0xbb,0xbc,
45140x02,0x02,0x44,0x01,0x00,
45150x21,0xFE,0x08,
'i',
'm',
'a',
'g',
'e',
' ',
'#',
'2',0x00,
45160x21,0x01,0x0C,
'p',
'l',
'a',
'i',
'n',
't',
'e',
'x',
't',
' ',
'#',
'2',0x00,0x3B
4527 {
PropertyTagTypeLong,
PropertyTagFrameDelay, 8, { 10,0,0,0,20,0,0,0 } },
4528 {
PropertyTagTypeASCII,
PropertyTagExifUserComment, 13, {
'H',
'e',
'l',
'l',
'o',
' ',
'W',
'o',
'r',
'l',
'd',
'!',0 } },
4530 {
PropertyTagTypeByte,
PropertyTagGlobalPalette, 12, { 0x01,0x02,0x03,0x04,0x05,0x06,0x07,0x08,0x09,0x0a,0x0b,0x0c } },
4537 UINT dim_count, frame_count, prop_count, prop_size,
i;
4538 UINT total_size, total_count;
4541 const char *item_data;
4546 trace(
"Failed to load GIF image data\n");
4568 "expected property count %u, got %u\n", (
UINT)
ARRAY_SIZE(td), prop_count);
4582 for (
i = 0;
i < prop_count;
i++)
4588 ok(
size >
sizeof(*prop_item),
"%u: too small item length %u\n",
i,
size);
4595 ok(prop_item->
value == prop_item + 1,
"expected item->value %p, got %p\n", prop_item + 1, prop_item->
value);
4597 "%u: expected type %u, got %u\n",
i, td[
i].type, prop_item->
type);
4598 ok(td[
i].
id == prop_item->
id,
"%u: expected id %#x, got %#x\n",
i, td[
i].id, prop_item->
id);
4599 size -=
sizeof(*prop_item);
4601 ok(td[
i].
length == prop_item->
length,
"%u: expected length %u, got %u\n",
i, td[
i].length, prop_item->
length);
4605 ok(
match,
"%u: data mismatch\n",
i);
4610 trace(
"id %#x:", prop_item->
id);
4629 total_size = 0xdeadbeef;
4630 total_count = 0xdeadbeef;
4633 ok(prop_count == total_count,
4634 "expected total property count %u, got %u\n", prop_count, total_count);
4635 ok(prop_size == total_size,
4636 "expected total property size %u, got %u\n", prop_size, total_size);
4655 item_data = (
const char *)(prop_item + prop_count);
4656 for (
i = 0;
i < prop_count;
i++)
4658 ok(prop_item[
i].
value == item_data,
"%u: expected value %p, got %p\n",
4659 i, item_data, prop_item[
i].
value);
4661 "%u: expected type %u, got %u\n",
i, td[
i].
type, prop_item[
i].
type);
4662 ok(td[
i].
id == prop_item[
i].
id,
"%u: expected id %#x, got %#x\n",
i, td[
i].
id, prop_item[
i].
id);
4667 ok(
match,
"%u: data mismatch\n",
i);
4672 trace(
"id %#x:", prop_item[
i].
id);
4678 item_data += prop_item[
i].
length;
4688 BYTE argb[8] = { 0x11,0x22,0x33,0x80, 0xff,0xff,0xff,0 };
4689 BYTE pargb[8] = { 0x09,0x11,0x1a,0x80, 0,0,0,0 };
4690 BYTE rgb32_xp[8] = { 0x11,0x22,0x33,0xff, 0xff,0xff,0xff,0xff };
4691 BYTE rgb24[6] = { 0x11,0x22,0x33, 0xff,0xff,0xff };
4703 ok(
data.Width == 2,
"expected 2, got %d\n",
data.Width);
4704 ok(
data.Height == 1,
"expected 1, got %d\n",
data.Height);
4705 ok(
data.Stride == 8,
"expected 8, got %d\n",
data.Stride);
4708 ok(
match,
"bits don't match\n");
4720 ok(
data.Width == 2,
"expected 2, got %d\n",
data.Width);
4721 ok(
data.Height == 1,
"expected 1, got %d\n",
data.Height);
4722 ok(
data.Stride == 8,
"expected 8, got %d\n",
data.Stride);
4725 !
memcmp(
data.Scan0, rgb32_xp,
sizeof(rgb32_xp));
4726 ok(
match,
"bits don't match\n");
4738 ok(
data.Width == 2,
"expected 2, got %d\n",
data.Width);
4739 ok(
data.Height == 1,
"expected 1, got %d\n",
data.Height);
4740 ok(
data.Stride == 8,
"expected 8, got %d\n",
data.Stride);
4743 ok(
match,
"bits don't match\n");
4785 UINT n_codecs, info_size,
i;
4797 for (
i = 0;
i < n_codecs;
i++)
4814 static const WCHAR bmp_mimetype[] = {
'i',
'm',
'a',
'g',
'e',
'/',
'b',
'm',
'p',0 };
4815 static const WCHAR jpeg_mimetype[] = {
'i',
'm',
'a',
'g',
'e',
'/',
'j',
'p',
'e',
'g',0 };
4817 static const WCHAR tiff_mimetype[] = {
'i',
'm',
'a',
'g',
'e',
'/',
't',
'i',
'f',
'f',0 };
4852 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal error %#x\n",
hr);
4865 static const GUID noneffect = { 0xcd0c3d4b, 0xe15e, 0x4cf2, { 0x9e, 0xa8, 0x6e, 0x1d, 0x65, 0x48, 0xc5, 0xa5 } };
4872 const GUID *
const effectlist[] =
4873 {&BlurEffectGuid, &SharpenEffectGuid, &ColorMatrixEffectGuid, &ColorLUTEffectGuid,
4874 &BrightnessContrastEffectGuid, &HueSaturationLightnessEffectGuid, &LevelsEffectGuid,
4875 &TintEffectGuid, &ColorBalanceEffectGuid, &RedEyeCorrectionEffectGuid, &ColorCurveEffectGuid};
4879 if(!pGdipCreateEffect || !pGdipDeleteEffect)
4882 win_skip(
"GDIPlus version 1.1 not available\n");
4886 stat = pGdipCreateEffect(BlurEffectGuid,
NULL);
4889 stat = pGdipCreateEffect(noneffect, &effect);
4894 stat = pGdipCreateEffect(*effectlist[
i], &effect);
4898 stat = pGdipDeleteEffect(effect);
4917 TRUE, 1, &colormap);
4923 TRUE, 1, &colormap);
4933 palette->Entries[0] = 0xffffff00;
4934 palette->Entries[1] = 0xffffff80;
4935 palette->Entries[2] = 0xffffffff;
4943 palette->Entries[0] = 0xffffff00;
4944 palette->Entries[1] = 0xffffff80;
4945 palette->Entries[2] = 0xffffffff;
4971 UINT ch0[256], ch1[256], ch2[256], ch3[256];
4988 if (!pGdipBitmapGetHistogramSize)
4990 win_skip(
"GdipBitmapGetHistogramSize is not supported\n");
4997 stat = pGdipBitmapGetHistogramSize(0xff,
NULL);
5001 stat = pGdipBitmapGetHistogramSize(10, &
num);
5032 stat = pGdipBitmapGetHistogram(bm, 123, 256, ch0, ch1, ch2, ch3);
5035 stat = pGdipBitmapGetHistogram(bm, 123, 256, ch0, ch1, ch2,
NULL);
5038 stat = pGdipBitmapGetHistogram(bm, 123, 256, ch0, ch1,
NULL,
NULL);
5058 ok(ch0[0xff] ==
WIDTH,
"Got red (0xff) %u\n", ch0[0xff]);
5059 ok(ch1[0xff] ==
WIDTH,
"Got green (0xff) %u\n", ch1[0xff]);
5060 ok(ch2[0xff] ==
WIDTH,
"Got blue (0xff) %u\n", ch1[0xff]);
5061 ok(ch0[0x01] ==
WIDTH,
"Got red (0x01) %u\n", ch0[0x01]);
5062 ok(ch1[0x3f] ==
WIDTH,
"Got green (0x3f) %u\n", ch1[0x3f]);
5063 ok(ch2[0x20] ==
WIDTH,
"Got blue (0x20) %u\n", ch1[0x20]);
5072 ok(ch1[0xff] ==
WIDTH,
"Got red (0xff) %u\n", ch1[0xff]);
5073 ok(ch2[0xff] ==
WIDTH,
"Got green (0xff) %u\n", ch2[0xff]);
5074 ok(ch3[0xff] ==
WIDTH,
"Got blue (0xff) %u\n", ch3[0xff]);
5075 ok(ch1[0x01] ==
WIDTH,
"Got red (0x01) %u\n", ch1[0x01]);
5076 ok(ch2[0x3f] ==
WIDTH,
"Got green (0x3f) %u\n", ch2[0x3f]);
5077 ok(ch3[0x20] ==
WIDTH,
"Got blue (0x20) %u\n", ch3[0x20]);
5079 ok(ch0[0xff] ==
WIDTH *
HEIGHT,
"Got alpha (0xff) %u\n", ch0[0xff]);
5102 if (!pGdipImageSetAbort)
5104 win_skip(
"GdipImageSetAbort() is not supported.\n");
5123 0x89,
'P',
'N',
'G',0x0d,0x0a,0x1a,0x0a,
5124 0x00,0x00,0x00,0x0d,
'I',
'H',
'D',
'R',0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x01,0x08,0x02,0x00,0x00,0x00,0x90,0x77,0x53,0xde,
5125 0x00,0x00,0x03,0x00,
'P',
'L',
'T',
'E',
5126 0x01,0x01,0x01,0x02,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08,0x08,
5127 0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d,0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10,
5128 0x11,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18,0x18,
5129 0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x20,0x20,0x20,
5130 0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x23,0x24,0x24,0x24,0x25,0x25,0x25,0x26,0x26,0x26,0x27,0x27,0x27,0x28,0x28,0x28,
5131 0x29,0x29,0x29,0x2a,0x2a,0x2a,0x2b,0x2b,0x2b,0x2c,0x2c,0x2c,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,0x2f,0x2f,0x2f,0x30,0x30,0x30,
5132 0x31,0x31,0x31,0x32,0x32,0x32,0x33,0x33,0x33,0x34,0x34,0x34,0x35,0x35,0x35,0x36,0x36,0x36,0x37,0x37,0x37,0x38,0x38,0x38,
5133 0x39,0x39,0x39,0x3a,0x3a,0x3a,0x3b,0x3b,0x3b,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,0x3e,0x3e,0x3f,0x3f,0x3f,0x40,0x40,0x40,
5134 0x41,0x41,0x41,0x42,0x42,0x42,0x43,0x43,0x43,0x44,0x44,0x44,0x45,0x45,0x45,0x46,0x46,0x46,0x47,0x47,0x47,0x48,0x48,0x48,
5135 0x49,0x49,0x49,0x4a,0x4a,0x4a,0x4b,0x4b,0x4b,0x4c,0x4c,0x4c,0x4d,0x4d,0x4d,0x4e,0x4e,0x4e,0x4f,0x4f,0x4f,0x50,0x50,0x50,
5136 0x51,0x51,0x51,0x52,0x52,0x52,0x53,0x53,0x53,0x54,0x54,0x54,0x55,0x55,0x55,0x56,0x56,0x56,0x57,0x57,0x57,0x58,0x58,0x58,
5137 0x59,0x59,0x59,0x5a,0x5a,0x5a,0x5b,0x5b,0x5b,0x5c,0x5c,0x5c,0x5d,0x5d,0x5d,0x5e,0x5e,0x5e,0x5f,0x5f,0x5f,0x60,0x60,0x60,
5138 0x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63,0x63,0x64,0x64,0x64,0x65,0x65,0x65,0x66,0x66,0x66,0x67,0x67,0x67,0x68,0x68,0x68,
5139 0x69,0x69,0x69,0x6a,0x6a,0x6a,0x6b,0x6b,0x6b,0x6c,0x6c,0x6c,0x6d,0x6d,0x6d,0x6e,0x6e,0x6e,0x6f,0x6f,0x6f,0x70,0x70,0x70,
5140 0x71,0x71,0x71,0x72,0x72,0x72,0x73,0x73,0x73,0x74,0x74,0x74,0x75,0x75,0x75,0x76,0x76,0x76,0x77,0x77,0x77,0x78,0x78,0x78,
5141 0x79,0x79,0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7b,0x7c,0x7c,0x7c,0x7d,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80,
5142 0x01,0x01,0x01,0x02,0x02,0x02,0x03,0x03,0x03,0x04,0x04,0x04,0x05,0x05,0x05,0x06,0x06,0x06,0x07,0x07,0x07,0x08,0x08,0x08,
5143 0x09,0x09,0x09,0x0a,0x0a,0x0a,0x0b,0x0b,0x0b,0x0c,0x0c,0x0c,0x0d,0x0d,0x0d,0x0e,0x0e,0x0e,0x0f,0x0f,0x0f,0x10,0x10,0x10,
5144 0x11,0x11,0x11,0x12,0x12,0x12,0x13,0x13,0x13,0x14,0x14,0x14,0x15,0x15,0x15,0x16,0x16,0x16,0x17,0x17,0x17,0x18,0x18,0x18,
5145 0x19,0x19,0x19,0x1a,0x1a,0x1a,0x1b,0x1b,0x1b,0x1c,0x1c,0x1c,0x1d,0x1d,0x1d,0x1e,0x1e,0x1e,0x1f,0x1f,0x1f,0x20,0x20,0x20,
5146 0x21,0x21,0x21,0x22,0x22,0x22,0x23,0x23,0x23,0x24,0x24,0x24,0x25,0x25,0x25,0x26,0x26,0x26,0x27,0x27,0x27,0x28,0x28,0x28,
5147 0x29,0x29,0x29,0x2a,0x2a,0x2a,0x2b,0x2b,0x2b,0x2c,0x2c,0x2c,0x2d,0x2d,0x2d,0x2e,0x2e,0x2e,0x2f,0x2f,0x2f,0x30,0x30,0x30,
5148 0x31,0x31,0x31,0x32,0x32,0x32,0x33,0x33,0x33,0x34,0x34,0x34,0x35,0x35,0x35,0x36,0x36,0x36,0x37,0x37,0x37,0x38,0x38,0x38,
5149 0x39,0x39,0x39,0x3a,0x3a,0x3a,0x3b,0x3b,0x3b,0x3c,0x3c,0x3c,0x3d,0x3d,0x3d,0x3e,0x3e,0x3e,0x3f,0x3f,0x3f,0x40,0x40,0x40,
5150 0x41,0x41,0x41,0x42,0x42,0x42,0x43,0x43,0x43,0x44,0x44,0x44,0x45,0x45,0x45,0x46,0x46,0x46,0x47,0x47,0x47,0x48,0x48,0x48,
5151 0x49,0x49,0x49,0x4a,0x4a,0x4a,0x4b,0x4b,0x4b,0x4c,0x4c,0x4c,0x4d,0x4d,0x4d,0x4e,0x4e,0x4e,0x4f,0x4f,0x4f,0x50,0x50,0x50,
5152 0x51,0x51,0x51,0x52,0x52,0x52,0x53,0x53,0x53,0x54,0x54,0x54,0x55,0x55,0x55,0x56,0x56,0x56,0x57,0x57,0x57,0x58,0x58,0x58,
5153 0x59,0x59,0x59,0x5a,0x5a,0x5a,0x5b,0x5b,0x5b,0x5c,0x5c,0x5c,0x5d,0x5d,0x5d,0x5e,0x5e,0x5e,0x5f,0x5f,0x5f,0x60,0x60,0x60,
5154 0x61,0x61,0x61,0x62,0x62,0x62,0x63,0x63,0x63,0x64,0x64,0x64,0x65,0x65,0x65,0x66,0x66,0x66,0x67,0x67,0x67,0x68,0x68,0x68,
5155 0x69,0x69,0x69,0x6a,0x6a,0x6a,0x6b,0x6b,0x6b,0x6c,0x6c,0x6c,0x6d,0x6d,0x6d,0x6e,0x6e,0x6e,0x6f,0x6f,0x6f,0x70,0x70,0x70,
5156 0x71,0x71,0x71,0x72,0x72,0x72,0x73,0x73,0x73,0x74,0x74,0x74,0x75,0x75,0x75,0x76,0x76,0x76,0x77,0x77,0x77,0x78,0x78,0x78,
5157 0x79,0x79,0x79,0x7a,0x7a,0x7a,0x7b,0x7b,0x7b,0x7c,0x7c,0x7c,0x7d,0x7d,0x7d,0x7e,0x7e,0x7e,0x7f,0x7f,0x7f,0x80,0x80,0x80,
5158 0x76,0xb6,0x24,0x31,
5159 0x00,0x00,0x00,0x02,
't',
'R',
'N',
'S',0xff,0x00,0xe5,0xb7,0x30,0x4a,
5160 0x00,0x00,0x00,0x0c,
'I',
'D',
'A',
'T',0x08,0xd7,0x63,0xf8,0xff,0xff,0x3f,0x00,0x05,0xfe,0x02,0xfe,0xdc,0xcc,0x59,0xe7,
5161 0x00,0x00,0x00,0x00,
'I',
'E',
'N',
'D',0xae,0x42,0x60,0x82
5164#define PNG_COLOR_TYPE_GRAY 0
5165#define PNG_COLOR_TYPE_RGB 2
5166#define PNG_COLOR_TYPE_PALETTE 3
5167#define PNG_COLOR_TYPE_GRAY_ALPHA 4
5168#define PNG_COLOR_TYPE_RGB_ALPHA 6
5174 char bit_depth, color_type;
5248 int i,
j, PLTE_off = 0, tRNS_off = 0;
5258 "flags = %#x\n",
flags);
5261 win_skip(
"broken PNG color space support\n");
5274 ok(PLTE_off && tRNS_off,
"PLTE offset %d, tRNS offset %d\n", PLTE_off, tRNS_off);
5275 if (!PLTE_off || !tRNS_off)
return;
5283 for (
j = 0;
j < 3;
j++)
5286 buf[24] = td[
i].bit_depth;
5287 buf[25] = td[
i].color_type;
5288 if (
j >=1)
memcpy(
buf + tRNS_off,
"tEST", 4);
5289 if (
j >=2)
memcpy(
buf + PLTE_off,
"tEST", 4);
5295 ok(
image !=
NULL,
"%d %d: failed to load image data\n",
i,
j);
5298 ok(
image ==
NULL,
"%d %d: succeed to load image data\n",
i,
j);
5302 if (!
image)
continue;
5322#undef PNG_COLOR_TYPE_GRAY
5323#undef PNG_COLOR_TYPE_RGB
5324#undef PNG_COLOR_TYPE_PALETTE
5325#undef PNG_COLOR_TYPE_GRAY_ALPHA
5326#undef PNG_COLOR_TYPE_RGB_ALPHA
5340 image = (
void *)0xdeadbeef;
5343 ok(
image == (
void *)0xdeadbeef,
"Unexpected image pointer.\n");
5351 ok(
hr ==
S_OK,
"Failed to create a stream.\n");
5396 if (!pGdipInitializePalette)
5398 win_skip(
"GdipInitializePalette is not supported on this platform\n");
5502#include "pshpack2.h"
5517#ifdef WORDS_BIGENDIAN
5543 { 1,0,2,3,4,5,6,7,8,9,0,1,2,3,4,5 }
5615 if (
tag[
i].
id == 0x102)
5617 else if (
tag[
i].
id == 0x106)
5618 tag_photo = &
tag[
i];
5619 else if (
tag[
i].
id == 0x115)
5620 tag_samples = &
tag[
i];
5621 else if (
tag[
i].
id == 0x140)
5622 tag_colormap = &
tag[
i];
5625 ok(tag_bps && tag_photo && tag_samples && tag_colormap,
"tag 0x102,0x106,0x115 or 0x140 is missing\n");
5626 if (!tag_bps || !tag_photo || !tag_samples || !tag_colormap)
return;
5628 ok(tag_bps->type ==
IFD_SHORT,
"tag 0x102 should have type IFD_SHORT\n");
5629 bps = (
short *)(
buf + tag_bps->value);
5630 ok(bps[0] == 8 && bps[1] == 8 && bps[2] == 8 && bps[3] == 0,
5631 "expected bps 8,8,8,0 got %d,%d,%d,%d\n", bps[0], bps[1], bps[2], bps[3]);
5633 for (
i = 0;
i <
sizeof(td)/
sizeof(td[0]);
i++)
5635 tag_colormap->count = (1 << td[
i].bps) * 3;
5636 tag_photo->
value = td[
i].photometric;
5637 tag_bps->count = td[
i].samples;
5638 tag_samples->value = td[
i].samples;
5641 tag_bps->value = td[
i].bps;
5643 tag_bps->value =
MAKELONG(td[
i].bps, td[
i].bps);
5646 tag_bps->value = (
BYTE *)bps -
buf;
5647 bps[0] = bps[1] = bps[2] = td[
i].bps;
5651 tag_bps->value = (
BYTE *)bps -
buf;
5652 bps[0] = bps[1] = bps[2] = bps[3] = td[
i].bps;
5656 ok(0,
"%u: unsupported samples count %d\n",
i, td[
i].
samples);
5664 (
i == 19 ||
i == 20)),
5668 "%u: (%d,%d,%d) TIFF image loading should have failed\n",
i, td[
i].photometric, td[
i].
samples, td[
i].bps);
5672 if (!
image)
continue;
5720 pGdipBitmapGetHistogramSize = (
void*)
GetProcAddress(
mod,
"GdipBitmapGetHistogramSize");
std::map< E_MODULE, HMODULE > mod
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
INT copy(TCHAR source[MAX_PATH], TCHAR dest[MAX_PATH], INT append, DWORD lpdwFlags, BOOL bTouch)
DWORD GetPixel(LPDIRECTDRAWSURFACE7 Surface, UINT x, UINT y)
static unsigned int palette_size(DWORD flags)
#define GetProcAddress(x, y)
#define HeapFree(x, y, z)
#define WideCharToMultiByte
GpStatus WINGDIPAPI GdipGetDpiX(GpGraphics *graphics, REAL *dpi)
GpStatus WINGDIPAPI GdipDrawImageI(GpGraphics *graphics, GpImage *image, INT x, INT y)
GpStatus WINGDIPAPI GdipGetDpiY(GpGraphics *graphics, REAL *dpi)
GpStatus WINGDIPAPI GdipDeleteGraphics(GpGraphics *graphics)
GpStatus WINGDIPAPI GdipSetCompositingMode(GpGraphics *graphics, CompositingMode mode)
GpStatus WINGDIPAPI GdipSetWorldTransform(GpGraphics *graphics, GpMatrix *matrix)
GpStatus WINGDIPAPI GdipDrawImageRectRectI(GpGraphics *graphics, GpImage *image, INT dstx, INT dsty, INT dstwidth, INT dstheight, INT srcx, INT srcy, INT srcwidth, INT srcheight, GpUnit srcUnit, GDIPCONST GpImageAttributes *imageAttributes, DrawImageAbort callback, VOID *callbackData)
GpStatus WINGDIPAPI GdipSetInterpolationMode(GpGraphics *graphics, InterpolationMode mode)
GpStatus WINGDIPAPI GdipDrawImagePointRectI(GpGraphics *graphics, GpImage *image, INT x, INT y, INT srcx, INT srcy, INT srcwidth, INT srcheight, GpUnit srcUnit)
GpStatus WINGDIPAPI GdipSetPixelOffsetMode(GpGraphics *graphics, PixelOffsetMode mode)
GpStatus WINGDIPAPI GdipCreateBitmapFromFile(GDIPCONST WCHAR *filename, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipGetPropertySize(GpImage *image, UINT *size, UINT *count)
GpStatus WINGDIPAPI GdipGetImageVerticalResolution(GpImage *image, REAL *res)
GpStatus WINGDIPAPI GdipGetImageRawFormat(GpImage *image, GUID *format)
GpStatus WINGDIPAPI GdipGetImagePalette(GpImage *image, ColorPalette *palette, INT size)
GpStatus WINGDIPAPI GdipGetImageEncodersSize(UINT *numEncoders, UINT *size)
GpStatus WINGDIPAPI GdipGetImageFlags(GpImage *image, UINT *flags)
GpStatus WINGDIPAPI GdipSaveImageToStream(GpImage *image, IStream *stream, GDIPCONST CLSID *clsid, GDIPCONST EncoderParameters *params)
GpStatus WINGDIPAPI GdipCloneBitmapAreaI(INT x, INT y, INT width, INT height, PixelFormat format, GpBitmap *srcBitmap, GpBitmap **dstBitmap)
GpStatus WINGDIPAPI GdipGetAllPropertyItems(GpImage *image, UINT size, UINT count, PropertyItem *buf)
GpStatus WINGDIPAPI GdipGetImageWidth(GpImage *image, UINT *width)
GpStatus WINGDIPAPI GdipGetImageHeight(GpImage *image, UINT *height)
GpStatus WINGDIPAPI GdipGetImageDimension(GpImage *image, REAL *width, REAL *height)
GpStatus WINGDIPAPI GdipCreateBitmapFromScan0(INT width, INT height, INT stride, PixelFormat format, BYTE *scan0, GpBitmap **bitmap)
#define PropertyTagTypeSShort
static const WCHAR png_mimetype[]
GpStatus WINGDIPAPI GdipSetImagePalette(GpImage *image, GDIPCONST ColorPalette *palette)
static const WCHAR jpeg_mimetype[]
GpStatus WINGDIPAPI GdipImageGetFrameCount(GpImage *image, GDIPCONST GUID *dimensionID, UINT *count)
static const WCHAR bmp_format[]
#define PropertyTagTypeFloat
GpStatus WINGDIPAPI GdipGetImageGraphicsContext(GpImage *image, GpGraphics **graphics)
#define PropertyTagTypeDouble
GpStatus WINGDIPAPI GdipSaveImageToFile(GpImage *image, GDIPCONST WCHAR *filename, GDIPCONST CLSID *clsidEncoder, GDIPCONST EncoderParameters *encoderParams)
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsCount(GpImage *image, UINT *count)
GpStatus WINGDIPAPI GdipBitmapSetResolution(GpBitmap *bitmap, REAL xdpi, REAL ydpi)
static const WCHAR bmp_mimetype[]
GpStatus WINGDIPAPI GdipCreateBitmapFromGdiDib(GDIPCONST BITMAPINFO *info, VOID *bits, GpBitmap **bitmap)
static const WCHAR tiff_mimetype[]
GpStatus WINGDIPAPI GdipBitmapLockBits(GpBitmap *bitmap, GDIPCONST GpRect *rect, UINT flags, PixelFormat format, BitmapData *lockeddata)
GpStatus WINGDIPAPI GdipGetPropertyCount(GpImage *image, UINT *num)
GpStatus WINGDIPAPI GdipDisposeImage(GpImage *image)
GpStatus WINGDIPAPI GdipGetImagePixelFormat(GpImage *image, PixelFormat *format)
GpStatus WINGDIPAPI GdipLoadImageFromFile(GDIPCONST WCHAR *filename, GpImage **image)
GpStatus WINGDIPAPI GdipGetImageThumbnail(GpImage *image, UINT width, UINT height, GpImage **ret_image, GetThumbnailImageAbort cb, VOID *cb_data)
GpStatus WINGDIPAPI GdipBitmapGetPixel(GpBitmap *bitmap, INT x, INT y, ARGB *color)
GpStatus WINGDIPAPI GdipBitmapSetPixel(GpBitmap *bitmap, INT x, INT y, ARGB color)
#define PropertyTagTypeSByte
GpStatus WINGDIPAPI GdipGetImagePaletteSize(GpImage *image, INT *size)
GpStatus WINGDIPAPI GdipImageSelectActiveFrame(GpImage *image, GDIPCONST GUID *dimensionID, UINT frame)
GpStatus WINGDIPAPI GdipGetPropertyIdList(GpImage *image, UINT num, PROPID *list)
GpStatus WINGDIPAPI GdipGetImageType(GpImage *image, ImageType *type)
GpStatus WINGDIPAPI GdipLoadImageFromStream(IStream *stream, GpImage **image)
GpStatus WINGDIPAPI GdipCreateBitmapFromStream(IStream *stream, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipImageRotateFlip(GpImage *image, RotateFlipType type)
GpStatus WINGDIPAPI GdipGetImageEncoders(UINT numEncoders, UINT size, ImageCodecInfo *encoders)
GpStatus WINGDIPAPI GdipGetPropertyItem(GpImage *image, PROPID propid, UINT size, PropertyItem *buffer)
GpStatus WINGDIPAPI GdipLoadImageFromFileICM(GDIPCONST WCHAR *filename, GpImage **image)
GpStatus WINGDIPAPI GdipCreateHBITMAPFromBitmap(GpBitmap *bitmap, HBITMAP *hbmReturn, ARGB background)
GpStatus WINGDIPAPI GdipTestControl(GpTestControlEnum control, void *param)
GpStatus WINGDIPAPI GdipGetImageBounds(GpImage *image, GpRectF *srcRect, GpUnit *srcUnit)
static const struct image_codec codecs[NUM_CODECS]
GpStatus WINGDIPAPI GdipCreateBitmapFromHICON(HICON hicon, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipGetImageHorizontalResolution(GpImage *image, REAL *res)
GpStatus WINGDIPAPI GdipCloneImage(GpImage *image, GpImage **cloneImage)
GpStatus WINGDIPAPI GdipGetPropertyItemSize(GpImage *image, PROPID propid, UINT *size)
GpStatus WINGDIPAPI GdipImageGetFrameDimensionsList(GpImage *image, GUID *dimensionIDs, UINT count)
static const WCHAR gif_mimetype[]
GpStatus WINGDIPAPI GdipBitmapUnlockBits(GpBitmap *bitmap, BitmapData *lockeddata)
GpStatus WINGDIPAPI GdipCreateBitmapFromHBITMAP(HBITMAP hbm, HPALETTE hpal, GpBitmap **bitmap)
GpStatus WINGDIPAPI GdipCreateMatrix2(REAL m11, REAL m12, REAL m21, REAL m22, REAL dx, REAL dy, GpMatrix **matrix)
GpStatus WINGDIPAPI GdipDeleteMatrix(GpMatrix *matrix)
static void cleanup(void)
BOOL WINAPI DeleteFileA(IN LPCSTR lpFileName)
HMODULE WINAPI DECLSPEC_HOTPATCH GetModuleHandleA(LPCSTR lpModuleName)
HINSTANCE WINAPI DECLSPEC_HOTPATCH LoadLibraryA(LPCSTR lpLibFileName)
INT WINAPI CompareStringA(LCID lcid, DWORD flags, LPCSTR str1, INT len1, LPCSTR str2, INT len2)
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
INT WINAPI StringFromGUID2(REFGUID id, LPOLESTR str, INT cmax)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
static unsigned char buff[32768]
void WINGDIPAPI GdipFree(void *ptr)
Status WINAPI GdiplusStartup(ULONG_PTR *token, const struct GdiplusStartupInput *input, struct GdiplusStartupOutput *output)
void *WINGDIPAPI GdipAlloc(SIZE_T size)
@ ColorMatrixFlagsSkipGrays
@ ColorMatrixFlagsAltGray
@ ColorMatrixFlagsDefault
@ CompositingModeSourceCopy
@ ImageFlagsColorSpaceCMYK
@ ImageFlagsColorSpaceYCBCR
@ ImageFlagsColorSpaceYCCK
@ ImageFlagsColorSpaceRGB
@ ImageFlagsColorSpaceGRAY
@ PixelOffsetModeHighSpeed
@ PixelOffsetModeHighQuality
@ TestControlGetBuildNumber
@ MetafileTypeWmfPlaceable
@ InterpolationModeNearestNeighbor
struct CGpEffect CGpEffect
#define PropertyTagIndexTransparent
#define PropertyTagFrameDelay
#define PropertyTagTypeShort
#define PropertyTagIndexBackground
@ ImageLockModeUserInputBuf
#define PropertyTagTypeLong
#define PropertyTagGlobalPalette
#define PropertyTagTypeUndefined
#define PropertyTagTypeSLONG
#define PropertyTagTypeRational
#define PropertyTagTypeByte
#define PropertyTagTypeSRational
#define PropertyTagLoopCount
#define PropertyTagTypeASCII
#define PropertyTagExifUserComment
void WINAPI GdiplusShutdown(ULONG_PTR)
struct GdiplusAbort GdiplusAbort
GLint GLint GLint GLint GLint x
GLuint GLuint GLsizei count
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
GLuint GLuint GLsizei GLenum type
GLint GLint GLint GLint GLint GLint y
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLenum GLenum GLenum GLenum GLenum scale
GLenum GLuint GLenum GLsizei const GLchar * buf
GLenum GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * bits
GLuint GLsizei GLsizei * length
GLubyte GLubyte GLubyte GLubyte w
GLfloat GLfloat GLfloat GLfloat h
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
LPVOID NTAPI GlobalLock(HGLOBAL hMem)
BOOL NTAPI GlobalUnlock(HGLOBAL hMem)
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
GpStatus WINGDIPAPI GdipGetImageAttributesAdjustedPalette(GpImageAttributes *imageattr, ColorPalette *palette, ColorAdjustType type)
GpStatus WINGDIPAPI GdipSetImageAttributesColorMatrix(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, GDIPCONST ColorMatrix *colorMatrix, GDIPCONST ColorMatrix *grayMatrix, ColorMatrixFlags flags)
GpStatus WINGDIPAPI GdipSetImageAttributesGamma(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, REAL gamma)
GpStatus WINGDIPAPI GdipCreateImageAttributes(GpImageAttributes **imageattr)
GpStatus WINGDIPAPI GdipSetImageAttributesColorKeys(GpImageAttributes *imageattr, ColorAdjustType type, BOOL enableFlag, ARGB colorLow, ARGB colorHigh)
GpStatus WINGDIPAPI GdipDisposeImageAttributes(GpImageAttributes *imageattr)
GpStatus WINGDIPAPI GdipSetImageAttributesRemapTable(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag, UINT mapSize, GDIPCONST ColorMap *map)
GpStatus WINGDIPAPI GdipSetImageAttributesNoOp(GpImageAttributes *imageAttr, ColorAdjustType type, BOOL enableFlag)
GpStatus WINGDIPAPI GdipResetImageAttributes(GpImageAttributes *imageAttr, ColorAdjustType type)
_CRT_MANAGED_FP_DEPRECATE _ACRTIMP errno_t __cdecl _controlfp_s(_Out_opt_ unsigned int *_CurrentState, _In_ unsigned int _NewValue, _In_ unsigned int _Mask)
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
#define memcpy(s1, s2, n)
static const WCHAR desc[]
static UINT documented_type(UINT type)
static void test_GdipCreateBitmapFromHBITMAP(void)
static void test_multiframegif(void)
static void test_testcontrol(void)
static void test_tiff_palette(void)
static UINT *static UINT UINT UINT UINT *static GdiplusAbort *static BOOL
static UINT *static UINT UINT UINT UINT *static GdiplusAbort *static INT
static void test_getsetpixel(void)
static void test_createhbitmap(void)
static void test_GetImageDimension(void)
static void test_bufferrawformat(void *buff, int size, REFGUID expected, int line, BOOL todo)
static BYTE * init_bitmap(UINT *width, UINT *height, UINT *stride)
static void test_remaptable(void)
static void test_GdipLoadImageFromStream(void)
static void test_createfromwmf_noplaceable(void)
#define PNG_COLOR_TYPE_RGB
static void test_encoders(void)
static void test_DrawImage_SourceCopy(void)
static void test_colorkey(void)
static void test_GdipCloneImage(void)
static void test_imageabort(void)
static void test_dispose(void)
static const unsigned char transparentgif[]
static void test_GdipInitializePalette(void)
static const char png_1x1_data[]
static void test_gif_properties(void)
static void test_histogram(void)
static void test_getthumbnail(void)
static void test_FromGdiDib(void)
static void test_getrawformat(void)
static void test_LockBits_UserBuf(void)
static BOOL get_encoder_clsid(LPCWSTR mime, GUID *format, CLSID *clsid)
static void test_colormatrix(void)
static const unsigned char gifimage[35]
static void test_getadjustedpalette(void)
static void test_LockBits(void)
static void test_GdipDrawImagePointRect(void)
static void test_GdipGetImageFlags(void)
static void test_SavingImages(void)
static UINT *static HistogramFormat
static void test_tiff_color_formats(void)
static void test_DrawImage(void)
static const unsigned char bmpimage[66]
static void test_GdipGetAllPropertyItems(void)
static void check_halftone_palette(ColorPalette *palette)
static void test_rotateflip(void)
static BOOL color_match(ARGB c1, ARGB c2, BYTE max_diff)
static void test_LoadingImages(void)
static GpImage * load_image(const BYTE *image_data, UINT image_size, BOOL valid_data, BOOL todo_load)
static const struct tiff_data TIFF_data
static void test_ARGB_conversion(void)
#define expect(expected, got)
static const BYTE animatedgif[]
static void expect_rawformat(REFGUID expected, GpImage *img, int line, BOOL todo)
static void test_createfromwmf(void)
static const struct tiff_1x1_data tiff_1x1_data
static void test_GdipImageGetFrameDimensionsCount(void)
static UINT *static UINT UINT UINT UINT *static GdiplusAbort *static PaletteType
static const unsigned char wmfimage[180]
static void test_fromhicon(void)
static void test_createeffect(void)
#define expectf(expected, got)
static void test_CloneBitmapArea(void)
#define PNG_COLOR_TYPE_GRAY
static const unsigned char gifanimation[72]
static const unsigned char gifanimation2[]
static void test_DrawImage_scale(void)
static void test_png_color_formats(void)
static ARGB gifanimation2_pixels[5][4]
static const unsigned char tiffimage[]
static const unsigned char pngimage[285]
#define PNG_COLOR_TYPE_PALETTE
static void test_resolution(void)
static void test_image_properties(void)
static const unsigned char jpgimage[285]
static void test_tiff_properties(void)
static void test_gamma(void)
static void test_Scan0(void)
static void test_bitmapbits(void)
static void test_supported_encoders(void)
static void test_loadwmf(void)
static void test_palette(void)
static void test_image_format(void)
static LONG obj_refcount(void *obj)
static void test_formats(AUDCLNT_SHAREMODE mode)
#define todo_wine_if(is_todo)
static CHAR filenameA[MAX_PATH]
#define expect_guid(expected, guid)
static const CLSID IPropertyStorage UINT *static const PROPSPEC PROPVARIANT *static UINT const PROPSPEC PROPVARIANT PROPID
#define LOCALE_SYSTEM_DEFAULT
interface IStream * LPSTREAM
png_const_structrp png_const_inforp int * unit
#define DEFINE_GUID(name, l, w1, w2, b1, b2, b3, b4, b5, b6, b7, b8)
#define IsEqualGUID(rguid1, rguid2)
DWORD WINAPI GetVersion()
BITMAPINFOHEADER bmiHeader
BITMAPINFOHEADER bmiHeader
short palette_data[3][256]
struct IFD_entry entry[12]
struct IFD_rational srational_val
struct IFD_rational rational[3]
struct IFD_entry entry[40]
#define FIELD_OFFSET(t, f)
struct BITMAPINFOWITHBITFIELDS bf
HBITMAP WINAPI CreateDIBSection(HDC hDC, CONST BITMAPINFO *BitmapInfo, UINT Usage, VOID **Bits, HANDLE hSection, DWORD dwOffset)
int WINAPI GetObjectW(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HBITMAP WINAPI CreateBitmap(_In_ INT cx, _In_ INT cy, _In_ UINT cPlanes, _In_ UINT cBitsPerPel, _In_opt_ const VOID *pvBits)
int WINAPI GetDeviceCaps(_In_opt_ HDC, _In_ int)
int WINAPI GetObjectA(_In_ HANDLE h, _In_ int c, _Out_writes_bytes_opt_(c) LPVOID pv)
HPALETTE WINAPI CreatePalette(_In_reads_(_Inexpressible_(2 *sizeof(WORD)+plpal->palNumEntries *sizeof(PALETTEENTRY))) const LOGPALETTE *)
HGDIOBJ WINAPI SelectObject(_In_ HDC, _In_ HGDIOBJ)
HDC WINAPI CreateCompatibleDC(_In_opt_ HDC hdc)
HMETAFILE WINAPI SetMetaFileBitsEx(_In_ UINT cbBuffer, _In_reads_bytes_(cbBuffer) CONST BYTE *lpData)
BOOL WINAPI DeleteDC(_In_ HDC)
int WINAPI ReleaseDC(_In_opt_ HWND, _In_ HDC)
HICON WINAPI CreateIconIndirect(_In_ PICONINFO)
HDC WINAPI GetDC(_In_opt_ HWND)
BOOL WINAPI DestroyIcon(_In_ HICON)