29#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
34 rc = IUnknown_Release(
obj);
35 ok_(__FILE__,
line)(rc ==
ref,
"expected refcount %d, got %d\n",
ref, rc);
44#define IFD_UNDEFINED 7
47#define IFD_SRATIONAL 10
103 { 0x11, 0x22, 0x33, 0 }
118#ifdef WORDS_BIGENDIAN
145 { 0x11,0x22,0x33,0x44,0x55,0x66,0x77,0x88 }
161#ifdef WORDS_BIGENDIAN
203 { { 100, 1 }, { 50, 1 }, 0, 100.0, 50.0, 0, 0 },
204 { { 50, 1 }, { 100, 1 }, 0, 50.0, 100.0, 0, 0 },
206 { { 100, 1 }, { 50, 1 }, 1, 100.0, 50.0, 0, 0 },
207 { { 50, 1 }, { 100, 1 }, 1, 50.0, 100.0, 0, 0 },
209 { { 49, 1 }, { 49, 1 }, 2, 49.0, 49.0, 0, 0 },
210 { { 33, 1 }, { 55, 1 }, 2, 33.0, 55.0, 0, 0 },
211 { { 50, 2 }, { 66, 3 }, 2, 25.0, 22.0, 0, 0 },
213 { { 100, 1 }, { 200, 1 }, 3, 254.0, 508.0, 0, 0 },
216 { { 0, 1 }, { 29, 1 }, 2, 96.0, 96.0, 0, 29.0 },
217 { { 58, 1 }, { 29, 0 }, 2, 96.0, 96.0, 58.0, 0 },
220 { { 0, 1 }, { 100, 1 }, 3, 96.0, 96.0, 243.84, 254.0 },
221 { { 50, 1 }, { 72, 0 }, 3, 96.0, 96.0, 127.0, 243.84 }
237#ifdef WORDS_BIGENDIAN
263 { 0x11, 0x22, 0x33, 0 }
278#ifdef WORDS_BIGENDIAN
318#ifdef WORDS_BIGENDIAN
344 { 0x12,0x30, 0x47,0xe0 }
358 ok(hdata != 0,
"GlobalAlloc failed\n");
359 if (!hdata)
return NULL;
366 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal failed, hr=%x\n",
hr);
388 ok(
hr ==
S_OK,
"CreateStreamOnHGlobal error %#x\n",
hr);
393 hr = IWICBitmapDecoder_GetContainerFormat(*decoder, &
format);
394 ok(
hr ==
S_OK,
"GetContainerFormat error %#x\n",
hr);
398 refcount = IStream_Release(
stream);
399 ok(refcount > 0,
"expected stream refcount > 0\n");
415 hr = IWICComponentInfo_QueryInterface(
info, &IID_IWICPixelFormatInfo2, (
void **)&formatinfo);
418 hr = IWICPixelFormatInfo2_SupportsTransparency(formatinfo, trasparency);
419 ok(
hr ==
S_OK,
"SupportsTransparency error %#x\n",
hr);
420 IWICPixelFormatInfo2_Release(formatinfo);
422 hr = IWICComponentInfo_QueryInterface(
info, &IID_IWICPixelFormatInfo, (
void **)&formatinfo);
425 hr = IWICPixelFormatInfo2_GetBitsPerPixel(formatinfo,
bpp);
426 ok(
hr ==
S_OK,
"GetBitsPerPixel error %#x\n",
hr);
427 hr = IWICPixelFormatInfo2_GetChannelCount(formatinfo,
channels);
428 ok(
hr ==
S_OK,
"GetChannelCount error %#x\n",
hr);
429 IWICPixelFormatInfo2_Release(formatinfo);
431 IWICComponentInfo_Release(
info);
448 printf(
"tag %u: id %04x, type %04x, count %u, value %d",
452 short *bps = (
short *)((
char *)
tiff +
tag[
i].value);
453 printf(
" (%d,%d,%d,%d)\n", bps[0], bps[1], bps[2], bps[3]);
469 ok(
hr ==
S_OK,
"Failed to load TIFF image data %#x\n",
hr);
472 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
475 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
476 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
481 ok(
hr ==
S_OK,
"CreatePalette error %#x\n",
hr);
482 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
484 "expected WINCODEC_ERR_PALETTEUNAVAILABLE, got %#x\n",
hr);
487 IWICBitmapFrameDecode_Release(frame);
488 IWICBitmapDecoder_Release(decoder);
510 hr = IWICImagingFactory_CreateDecoder(
factory, &GUID_ContainerFormatTiff,
NULL, &decoder);
511 ok(
hr ==
S_OK,
"CreateDecoder error %#x\n",
hr);
514 frame_count = 0xdeadbeef;
515 hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
517 ok(frame_count == 0,
"expected 0, got %u\n", frame_count);
519 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
524 ok(
hr ==
S_OK,
"IStream_Seek error %#x\n",
hr);
526 capability = 0xdeadbeef;
527 hr = IWICBitmapDecoder_QueryCapability(decoder,
stream, &capability);
528 ok(
hr ==
S_OK,
"QueryCapability error %#x\n",
hr);
529 ok(capability == exp_caps || capability == exp_caps_xp,
530 "expected %#x, got %#x\n", exp_caps, capability);
532 frame_count = 0xdeadbeef;
533 hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
534 ok(
hr ==
S_OK,
"GetFrameCount error %#x\n",
hr);
535 ok(frame_count == 1,
"expected 1, got %u\n", frame_count);
537 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
539 IWICBitmapFrameDecode_Release(frame);
543 ok(
hr ==
S_OK,
"IStream_Seek error %#x\n",
hr);
545 "current stream pos is at %x/%x\n", cur_pos.
u.LowPart, cur_pos.
u.HighPart);
547 hr = IWICBitmapDecoder_QueryCapability(decoder,
stream, &capability);
553 IWICBitmapDecoder_Release(decoder);
560 IWICBitmapDecoder_Release(decoder);
564 ok(
hr ==
S_OK,
"IStream_Seek error %#x\n",
hr);
567 ok(
hr ==
S_OK,
"CreateDecoderFromStream error %#x\n",
hr);
569 frame_count = 0xdeadbeef;
570 hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
571 ok(
hr ==
S_OK,
"GetFrameCount error %#x\n",
hr);
572 ok(frame_count == 1,
"expected 1, got %u\n", frame_count);
574 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
576 IWICBitmapFrameDecode_Release(frame);
581 hr = IWICBitmapDecoder_QueryCapability(decoder,
stream, &capability);
584 IWICBitmapDecoder_Release(decoder);
599 static const BYTE expected_data[16] = { 0x11,0x11,0x11,0x22,0x33,0x33,0x33,0x44,
600 0x55,0x55,0x55,0x66,0x77,0x77,0x77,0x88 };
603 ok(
hr ==
S_OK,
"Failed to load TIFF image data %#x\n",
hr);
606 hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
607 ok(
hr ==
S_OK,
"GetFrameCount error %#x\n",
hr);
608 ok(frame_count == 1,
"expected 1, got %u\n", frame_count);
611 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
614 IWICBitmapDecoder_Release(decoder);
621 hr = IWICBitmapFrameDecode_GetResolution(frame, &dpi_x, &dpi_y);
622 ok(
hr ==
S_OK,
"GetResolution error %#x\n",
hr);
623 ok(dpi_x == 96.0,
"expected 96.0, got %f\n", dpi_x);
624 ok(dpi_y == 96.0,
"expected 96.0, got %f\n", dpi_y);
626 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
627 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
632 ok(
hr ==
S_OK,
"CreatePalette error %#x\n",
hr);
633 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
635 "expected WINCODEC_ERR_PALETTEUNAVAILABLE, got %#x\n",
hr);
642 hr = IWICBitmapFrameDecode_CopyPixels(frame, &rc, 8,
sizeof(
data),
data);
645 for (
i = 0;
i <
sizeof(
data);
i++)
646 ok(
data[
i] == expected_data[
i],
"%u: expected %02x, got %02x\n",
i, expected_data[
i],
data[
i]);
648 IWICBitmapFrameDecode_Release(frame);
653 unsigned short *
r, *
g, *
b;
676 g[
i] = (
i | 0x40) * 257;
677 b[
i] = (
i | 0x80) * 257;
696 ok(
hr ==
S_OK,
"Failed to load TIFF image data %#x\n",
hr);
699 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
702 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
703 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
708 ok(
hr ==
S_OK,
"CreatePalette error %#x\n",
hr);
709 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
710 ok(
hr ==
S_OK,
"CopyPalette error %#x\n",
hr);
713 ok(
hr ==
S_OK,
"GetColorCount error %#x\n",
hr);
725 IWICBitmapFrameDecode_Release(frame);
726 IWICBitmapDecoder_Release(decoder);
745 ok(
hr ==
S_OK,
"Failed to load TIFF image data %#x\n",
hr);
748 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
751 hr = IWICBitmapFrameDecode_GetResolution(frame, &dpi_x, &dpi_y);
752 ok(
hr ==
S_OK,
"%d: GetResolution error %#x\n",
i,
hr);
757 "%d: x: expected %f or %f, got %f\n",
i,
test_data->expected_dpi_x,
test_data->broken_dpi_x, dpi_x);
762 "%d: x: expected %f, got %f\n",
i,
test_data->expected_dpi_x, dpi_x);
768 "%d: y: expected %f or %f, got %f\n",
i,
test_data->expected_dpi_y,
test_data->broken_dpi_y, dpi_y);
773 "%d: y: expected %f, got %f\n",
i,
test_data->expected_dpi_y, dpi_y);
776 IWICBitmapFrameDecode_Release(frame);
777 IWICBitmapDecoder_Release(decoder);
791 static const BYTE expected_data[] = { 0x33,0x22,0x11 };
794 ok(
hr ==
S_OK,
"Failed to load TIFF image data %#x\n",
hr);
796 ok(decoder !=
NULL,
"Failed to load TIFF image data\n");
798 hr = IWICBitmapDecoder_GetFrameCount(decoder, &
count);
799 ok(
hr ==
S_OK,
"GetFrameCount error %#x\n",
hr);
802 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
810 hr = IWICBitmapFrameDecode_GetResolution(frame, &dpi_x, &dpi_y);
811 ok(
hr ==
S_OK,
"GetResolution error %#x\n",
hr);
812 ok(dpi_x == 300.0,
"got %f\n", dpi_x);
813 ok(dpi_y == 300.0,
"got %f\n", dpi_y);
815 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
816 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
827 hr = IWICBitmapFrameDecode_CopyPixels(frame, &rc,
stride,
sizeof(
data),
data);
834 for (
i = 0;
i <
sizeof(
data);
i++)
835 ok(
data[
i] == expected_data[
i],
"%u: expected %02x, got %02x\n",
i, expected_data[
i],
data[
i]);
839 IWICBitmapFrameDecode_Release(frame);
840 IWICBitmapDecoder_Release(decoder);
858#ifdef WORDS_BIGENDIAN
884 { 1,0,2,3,4,5,6,7,8,9,0,1,2,3,4,5 }
903 static const BYTE bits_1bpsBGR[] = { 0,255,0,255,0,255,255,255,0,0,0,255,255,0,0,0,255,255,255,255,255,0,0,0,0,255,0,255,0,255 };
906 24, 10, 2, &GUID_WICPixelFormat24bppBGR, bits_1bpsBGR
908 static const BYTE bits_4bpsBGR[] = { 204,85,85,136,187,51,0,85,85,85,0,68,0,102,0,136,0,119,0,153,0 };
911 24, 5, 2, &GUID_WICPixelFormat24bppBGR, bits_4bpsBGR
913 static const BYTE bits_8bpsBGR[] = { 2,0,1,5,4,3,8,7,6 };
916 24, 3, 1, &GUID_WICPixelFormat24bppBGR, bits_8bpsBGR
918 static const BYTE bits_48bppRGB[] = { 1,0,2,3,4,5,6,7,8,9,0,1 };
921 48, 2, 1, &GUID_WICPixelFormat48bppRGB, bits_48bppRGB
923 static const BYTE bits_1bpsBGRA[] = { 0,255,0,255,0,255,0,255,0,255,255,0,255,0,0,255,255,0,255,255,0,0,255,0,0,255,0,255,0,255,0,255,0,0,0,0,0,255,0,0 };
926 32, 5, 2, &GUID_WICPixelFormat32bppBGRA, bits_1bpsBGRA
928 static const BYTE bits_4bpsBGRA[] = { 204,85,85,51,85,136,187,85,0,68,0,85,0,102,0,119,0,136,0,153,0,0,0,17,0,34,0,51 };
931 32, 5, 2, &GUID_WICPixelFormat32bppBGRA, bits_4bpsBGRA
933 static const BYTE bits_8bpsBGRA[] = { 2,0,1,3,6,5,4,7,0,9,8,1,4,3,2,5 };
936 32, 4, 1, &GUID_WICPixelFormat32bppBGRA, bits_8bpsBGRA
938 static const BYTE bits_64bppRGBA[] = { 1,0,2,3,4,5,6,7,8,9,0,1,2,3,4,5 };
943 static const BYTE bits_BlackWhite[] = { 85,195,184,85 };
946 1, 30, 1, &GUID_WICPixelFormatBlackWhite, bits_BlackWhite
948 static const BYTE bits_BlackWhite_xp[] = { 85,195,184,84 };
949 static const struct bitmap_data data_BlackWhite_xp =
951 1, 30, 1, &GUID_WICPixelFormatBlackWhite, bits_BlackWhite_xp
953 static const BYTE bits_4bppGray[] = { 85,195,184,85 };
956 4, 7, 1, &GUID_WICPixelFormat4bppGray, bits_4bppGray
958 static const BYTE bits_4bppGray_xp[] = { 85,195,184,80 };
961 4, 7, 1, &GUID_WICPixelFormat4bppGray, bits_4bppGray_xp
968 static const BYTE bits_16bppGray[] = { 1,0,2,3,4,5 };
971 16, 3, 1, &GUID_WICPixelFormat16bppGray, bits_16bppGray
973 static const BYTE bits_32bppGrayFloat[] = { 1,0,2,3,4,5,6,7,8,9,0,1 };
974 static const struct bitmap_data data_32bppGrayFloat =
979 static const BYTE bits_96bpp3Channels[] = { 0 };
980 static const struct bitmap_data data_96bpp3Channels =
982 64, 1, 1, &GUID_WICPixelFormat96bpp3Channels, bits_96bpp3Channels
985 static const BYTE bits_128bppRGBAFloat[] = { 1,0,2,3,4,5,6,7,8,9,0,1,2,3,4,5 };
986 static const struct bitmap_data data_128bppRGBAFloat =
988 128, 1, 1, &GUID_WICPixelFormat128bppRGBAFloat, bits_128bppRGBAFloat
990 static const BYTE bits_1bppIndexed[] = { 85,195,184,85 };
993 1, 32, 1, &GUID_WICPixelFormat1bppIndexed, bits_1bppIndexed
995 static const BYTE bits_4bppIndexed[] = { 85,195,184,85 };
998 4, 7, 1, &GUID_WICPixelFormat4bppIndexed, bits_4bppIndexed
1000 static const BYTE bits_4bppIndexed_xp[] = { 85,195,184,80 };
1001 static const struct bitmap_data data_4bppIndexed_xp =
1003 4, 7, 1, &GUID_WICPixelFormat4bppIndexed, bits_4bppIndexed_xp
1005 static const BYTE bits_8bppIndexed[] = { 1,0,2,3,4,5,6,7,8,9 };
1006 static const struct bitmap_data data_8bppIndexed =
1008 8, 3, 1, &GUID_WICPixelFormat8bppIndexed, bits_8bppIndexed
1010 static const BYTE bits_32bppCMYK[] = { 1,0,2,3,4,5,6,7,8,9,0,1 };
1013 32, 3, 1, &GUID_WICPixelFormat32bppCMYK, bits_32bppCMYK
1015 static const BYTE bits_64bppCMYK[] = { 1,0,2,3,4,5,6,7,8,9,0,1,2,3,4,5 };
1018 64, 2, 1, &GUID_WICPixelFormat64bppCMYK, bits_64bppCMYK
1030 { 2, 3, 1, &data_1bpsBGR },
1031 { 2, 3, 4, &data_4bpsBGR },
1032 { 2, 3, 8, &data_8bpsBGR },
1033 { 2, 3, 16, &data_48bppRGB },
1036 { 2, 3, 32, &data_96bpp3Channels },
1038 { 2, 4, 1, &data_1bpsBGRA },
1039 { 2, 4, 4, &data_4bpsBGRA },
1040 { 2, 4, 8, &data_8bpsBGRA },
1041 { 2, 4, 16, &data_64bppRGBA },
1043 { 2, 4, 32, &data_128bppRGBAFloat },
1045 { 1, 1, 1, &data_BlackWhite, &data_BlackWhite_xp },
1046 { 1, 1, 4, &data_4bppGray, &data_4bppGray_xp },
1047 { 1, 1, 8, &data_8bppGray },
1048 { 1, 1, 16, &data_16bppGray },
1050 { 1, 1, 32, &data_32bppGrayFloat },
1052 { 3, 1, 1, &data_1bppIndexed },
1053 { 3, 1, 4, &data_4bppIndexed, &data_4bppIndexed_xp },
1054 { 3, 1, 8, &data_8bppIndexed },
1056 { 3, 1, 16, &data_8bppIndexed },
1057 { 3, 1, 24, &data_8bppIndexed },
1058 { 3, 1, 32, &data_8bppIndexed },
1063 { 5, 4, 8, &data_32bppCMYK },
1064 { 5, 4, 16, &data_64bppCMYK },
1089 if (
tag[
i].
id == 0x100)
1090 tag_width = &
tag[
i];
1091 else if (
tag[
i].
id == 0x101)
1092 tag_height = &
tag[
i];
1093 else if (
tag[
i].
id == 0x102)
1095 else if (
tag[
i].
id == 0x106)
1096 tag_photo = &
tag[
i];
1097 else if (
tag[
i].
id == 0x115)
1098 tag_samples = &
tag[
i];
1099 else if (
tag[
i].
id == 0x140)
1100 tag_colormap = &
tag[
i];
1103 ok(tag_bps && tag_photo && tag_samples && tag_colormap,
"tag 0x102,0x106,0x115 or 0x140 is missing\n");
1104 if (!tag_bps || !tag_photo || !tag_samples || !tag_colormap)
return;
1106 ok(tag_bps->type ==
IFD_SHORT,
"tag 0x102 should have type IFD_SHORT\n");
1107 bps = (
short *)(
buf + tag_bps->value);
1108 ok(bps[0] == 8 && bps[1] == 8 && bps[2] == 8 && bps[3] == 0,
1109 "expected bps 8,8,8,0 got %d,%d,%d,%d\n", bps[0], bps[1], bps[2], bps[3]);
1111 for (
i = 0;
i <
sizeof(td)/
sizeof(td[0]);
i++)
1115 bpp = td[
i].samples * td[
i].bps;
1117 trace(
"samples %u, bps %u, bpp %u, width %u => width_bytes %u\n", td[
i].
samples, td[
i].bps,
bpp,
1119 tag_width->
value = td[
i].data->width;
1120 tag_height->value = td[
i].data->height;
1124 tag_width->
value = 1;
1125 tag_height->value = 1;
1128 tag_colormap->count = (1 << td[
i].bps) * 3;
1145 tag_photo->
value = td[
i].photometric;
1146 tag_bps->count = td[
i].samples;
1147 tag_samples->value = td[
i].samples;
1150 tag_bps->value = td[
i].bps;
1152 tag_bps->value =
MAKELONG(td[
i].bps, td[
i].bps);
1155 tag_bps->value = (
BYTE *)bps -
buf;
1156 bps[0] = bps[1] = bps[2] = td[
i].bps;
1160 tag_bps->value = (
BYTE *)bps -
buf;
1161 bps[0] = bps[1] = bps[2] = bps[3] = td[
i].bps;
1165 ok(0,
"%u: unsupported samples count %d\n",
i, td[
i].
samples);
1173 "%u: (%d,%d,%d) wrong error %#x\n",
i, td[
i].photometric, td[
i].
samples, td[
i].bps,
hr);
1176 IWICBitmapDecoder_Release(decoder);
1183 "%u: failed to load TIFF image data (%d,%d,%d) %#x\n",
1185 if (
hr !=
S_OK)
continue;
1187 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
1188 ok(
hr ==
S_OK,
"%u: GetFrame error %#x\n",
i,
hr);
1190 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
1191 ok(
hr ==
S_OK,
"%u: GetPixelFormat error %#x\n",
i,
hr);
1193 "%u (%d,%d,%d): expected %s, got %s\n",
1194 i, td[
i].photometric, td[
i].samples, td[
i].bps,
1197 trasparency = (td[
i].photometric == 2 && td[
i].samples == 4);
1199 ok(
hr ==
S_OK,
"%u: get_pixelformat_bpp error %#x\n",
i,
hr);
1200 ok(
bpp == td[
i].
data->bpp,
"%u: expected %u, got %u\n",
i, td[
i].data->bpp,
bpp);
1202 ok(trasparency == (td[
i].photometric == 2 && td[
i].
samples == 4),
"%u: got %u\n",
i, trasparency);
1206 ok(
hr ==
S_OK,
"%u: CopyPixels error %#x\n",
i,
hr);
1208 if (
ret && td[
i].alt_data)
1210 ok(
ret == 0,
"%u: (%d,%d,%d) wrong pixel data\n",
i, td[
i].photometric, td[
i].
samples, td[
i].bps);
1214 for (
j = 0;
j <
n;
j++)
1218 IWICBitmapFrameDecode_Release(frame);
1219 IWICBitmapDecoder_Release(decoder);
1229 double dpi_x, dpi_y;
1234 static const BYTE expected_data[24] = { 0,0,0,0xff, 0xff,0,0,0, 0xff,0,0,0xff,
1235 0,0xff,0,0, 0xff,0xff,0,0xff, 0xff,0xff,0xff,0 };
1238 ok(
hr ==
S_OK,
"Failed to load TIFF image data %#x\n",
hr);
1241 hr = IWICBitmapDecoder_GetFrameCount(decoder, &frame_count);
1242 ok(
hr ==
S_OK,
"GetFrameCount error %#x\n",
hr);
1243 ok(frame_count == 1,
"expected 1, got %u\n", frame_count);
1245 hr = IWICBitmapDecoder_GetFrame(decoder, 0, &frame);
1253 hr = IWICBitmapFrameDecode_GetResolution(frame, &dpi_x, &dpi_y);
1254 ok(
hr ==
S_OK,
"GetResolution error %#x\n",
hr);
1255 ok(dpi_x == 96.0,
"expected 96.0, got %f\n", dpi_x);
1256 ok(dpi_y == 96.0,
"expected 96.0, got %f\n", dpi_y);
1258 hr = IWICBitmapFrameDecode_GetPixelFormat(frame, &
format);
1259 ok(
hr ==
S_OK,
"GetPixelFormat error %#x\n",
hr);
1264 ok(
hr ==
S_OK,
"CreatePalette error %#x\n",
hr);
1265 hr = IWICBitmapFrameDecode_CopyPalette(frame,
palette);
1267 "expected WINCODEC_ERR_PALETTEUNAVAILABLE, got %#x\n",
hr);
1275 hr = IWICBitmapFrameDecode_CopyPixels(frame, &rc, 12,
sizeof(
data),
data);
1276 ok(
hr ==
S_OK,
"CopyPixels error %#x\n",
hr);
1278 for (
i = 0;
i <
sizeof(
data);
i++)
1279 ok(
data[
i] == expected_data[
i],
"%u: expected %02x, got %02x\n",
i, expected_data[
i],
data[
i]);
1281 IWICBitmapFrameDecode_Release(frame);
1282 IWICBitmapDecoder_Release(decoder);
1292 &IID_IWICImagingFactory, (
void **)&
factory);
1293 ok(
hr ==
S_OK,
"CoCreateInstance error %#x\n",
hr);
1305 IWICImagingFactory_Release(
factory);
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
HRESULT WINAPI DECLSPEC_HOTPATCH CoCreateInstance(REFCLSID rclsid, LPUNKNOWN pUnkOuter, DWORD dwClsContext, REFIID iid, LPVOID *ppv)
HRESULT WINAPI DECLSPEC_HOTPATCH CoInitializeEx(LPVOID lpReserved, DWORD dwCoInit)
void WINAPI DECLSPEC_HOTPATCH CoUninitialize(void)
HRESULT WINAPI CreateStreamOnHGlobal(HGLOBAL hGlobal, BOOL fDeleteOnRelease, LPSTREAM *ppstm)
unsigned short(__cdecl typeof(TIFFCurrentDirectory))(struct tiff *)
GLint GLint GLsizei GLsizei GLsizei GLint GLenum GLenum const GLvoid * pixels
GLuint GLuint GLsizei GLenum type
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLdouble GLdouble GLdouble r
GLint GLint GLsizei width
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
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)
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
static GLint image_size(GLint width, GLint height, GLenum format, GLenum type)
#define memcpy(s1, s2, n)
static const float bits_32bppGrayFloat[]
static const BYTE bits_8bppGray[]
static const BYTE bits_64bppRGBA[]
@ COINIT_APARTMENTTHREADED
#define IsEqualGUID(rguid1, rguid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
struct _ULARGE_INTEGER::@4136 u
const WICPixelFormatGUID * format
const struct bitmap_data * alt_data
struct IFD_entry entry[13]
short palette_data[3][256]
struct IFD_entry entry[12]
struct IFD_entry entry[13]
struct IFD_entry entry[14]
struct IFD_entry entry[15]
struct IFD_entry entry[14]
short palette_data[3][256]
struct IFD_entry entry[13]
#define FIELD_OFFSET(t, f)
@ WICDecodeMetadataCacheOnDemand
@ WICBitmapDecoderCapabilityCanDecodeSomeImages
@ WICBitmapDecoderCapabilityCanEnumerateMetadata
@ WICBitmapDecoderCapabilityCanDecodeAllImages
#define WINCODEC_ERR_COMPONENTNOTFOUND
#define WINCODEC_ERR_WRONGSTATE
#define WINCODEC_ERR_BADIMAGE
#define WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT
#define WINCODEC_ERR_PALETTEUNAVAILABLE
#define WINCODEC_ERR_FRAMEMISSING