30#include "wincodecsdk.h"
98 *puiWidth =
This->data->width;
99 *puiHeight =
This->data->height;
112 double *pDpiX,
double *pDpiY)
115 *pDpiX =
This->data->xres;
116 *pDpiY =
This->data->yres;
125 if (
IsEqualGUID(
This->data->format, &GUID_WICPixelFormat1bppIndexed) ||
132 colors[0] = 0xff0000ff;
133 colors[1] = 0xff00ff00;
134 colors[2] = 0xffff0000;
135 colors[3] = 0xff000000;
136 colors[4] = 0xffffff00;
137 colors[5] = 0xffff00ff;
138 colors[6] = 0xff00ffff;
139 colors[7] = 0xffffffff;
140 return IWICPalette_InitializeCustom(
palette, colors, 8);
170 bytesperrow = ((
This->data->bpp *
prc->Width)+7)/8;
171 srcstride = ((
This->data->bpp *
This->data->width)+7)/8;
173 if (cbStride < bytesperrow)
176 if ((cbStride *
prc->Height) > cbBufferSize)
179 row_offset =
prc->X *
This->data->bpp;
181 if (row_offset % 8 == 0)
187 src =
This->data->bits + (row_offset / 8) +
prc->Y * srcstride;
199 ok(0,
"bitmap %p was asked to copy pixels not aligned on a byte boundary\n", iface);
223 (*This)->data =
data;
230 ok(
This->ref == 1,
"test bitmap %p deleted with %li references instead of 1\n",
This,
This->ref);
244 for (
i=0;
i<(buffersize/4);
i++)
245 if ((
a[
i]&0xffffff) != (
b[
i]&0xffffff))
254 const float *
a=(
const float*)
expect->bits, *
b=(
const float*)converted_bits;
256 for (
i=0;
i<(buffersize/4);
i++)
269 for (
i=0;
i<buffersize;
i++)
270 if (
a[
i] !=
b[
i] &&
b[
i] != 0xff )
284 for (
i=0;
i<buffersize;
i++)
301 if (!bps) bps = buffersize;
302 printf(
"converted_bits (%u bytes):\n ", buffersize);
303 for (
i = 0;
i < buffersize;
i++)
305 printf(
"%u,", converted_bits[
i]);
306 if (!((
i + 1) % 32))
printf(
"\n ");
307 else if (!((
i+1) % bps))
printf(
" ");
329 BYTE *converted_bits;
334 GUID dst_pixelformat;
342 hr = IWICBitmapSource_GetResolution(
source, &xres, &yres);
347 hr = IWICBitmapSource_GetPixelFormat(
source, &dst_pixelformat);
360 memset(converted_bits, 0xaa, buffersize);
361 hr = IWICBitmapSource_CopyPixels(
source, &
prc,
stride, buffersize, converted_bits);
372 memset(converted_bits, 0xaa, buffersize);
385 0xaa,0xaa,0xaa,0xaa};
387 &GUID_WICPixelFormatBlackWhite, 1,
bits_1bpp, 32, 2, 96.0, 96.0};
389 &GUID_WICPixelFormat1bppIndexed, 1,
bits_1bpp, 32, 2, 96.0, 96.0};
393 0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,0xdb,
394 0x24,0x24,0x24,0x24,0x24,0x24,0x24,0x24};
396 &GUID_WICPixelFormat2bppIndexed, 2,
bits_2bpp, 32, 2, 96.0, 96.0};
400 0x34,0x43,0x34,0x43,0x34,0x43,0x34,0x43,0x34,0x43,0x34,0x43,0x34,0x43,0x34,0x43,
401 0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44,0x44};
404 &GUID_WICPixelFormat4bppIndexed, 4,
bits_4bpp, 32, 2, 96.0, 96.0};
407 0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,
408 1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0,1,0};
410 &GUID_WICPixelFormat8bppIndexed, 8,
bits_8bpp_BW, 32, 2, 96.0, 96.0};
413 0,1,2,0,0,1,2,0,0,1,2,0,0,1,2,0,0,1,2,0,0,1,2,0,0,1,2,0,0,1,2,0,
414 3,2,1,3,3,2,1,3,3,2,1,3,3,2,1,3,3,2,1,3,3,2,1,3,3,2,1,3,3,2,1,3};
419 0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,0,1,1,0,
420 1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1};
422 &GUID_WICPixelFormat8bppIndexed, 8,
bits_8bpp, 32, 2, 96.0, 96.0};
425 255,0,0, 0,255,0, 0,0,255, 0,0,0, 255,0,0, 0,255,0, 0,0,255, 0,0,0,
426 255,0,0, 0,255,0, 0,0,255, 0,0,0, 255,0,0, 0,255,0, 0,0,255, 0,0,0,
427 255,0,0, 0,255,0, 0,0,255, 0,0,0, 255,0,0, 0,255,0, 0,0,255, 0,0,0,
428 255,0,0, 0,255,0, 0,0,255, 0,0,0, 255,0,0, 0,255,0, 0,0,255, 0,0,0,
429 0,255,255, 255,0,255, 255,255,0, 255,255,255, 0,255,255, 255,0,255, 255,255,0, 255,255,255,
430 0,255,255, 255,0,255, 255,255,0, 255,255,255, 0,255,255, 255,0,255, 255,255,0, 255,255,255,
431 0,255,255, 255,0,255, 255,255,0, 255,255,255, 0,255,255, 255,0,255, 255,255,0, 255,255,255,
432 0,255,255, 255,0,255, 255,255,0, 255,255,255, 0,255,255, 255,0,255, 255,255,0, 255,255,255};
434 &GUID_WICPixelFormat24bppBGR, 24,
bits_24bppBGR, 32, 2, 96.0, 96.0};
437 0,0,255, 0,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0, 255,0,0, 0,0,0,
438 0,0,255, 0,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0, 255,0,0, 0,0,0,
439 0,0,255, 0,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0, 255,0,0, 0,0,0,
440 0,0,255, 0,255,0, 255,0,0, 0,0,0, 0,0,255, 0,255,0, 255,0,0, 0,0,0,
441 255,255,0, 255,0,255, 0,255,255, 255,255,255, 255,255,0, 255,0,255, 0,255,255, 255,255,255,
442 255,255,0, 255,0,255, 0,255,255, 255,255,255, 255,255,0, 255,0,255, 0,255,255, 255,255,255,
443 255,255,0, 255,0,255, 0,255,255, 255,255,255, 255,255,0, 255,0,255, 0,255,255, 255,255,255,
444 255,255,0, 255,0,255, 0,255,255, 255,255,255, 255,255,0, 255,0,255, 0,255,255, 255,255,255 };
446 &GUID_WICPixelFormat24bppRGB, 24,
bits_24bppRGB, 32, 2, 96.0, 96.0};
449 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80, 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80,
450 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80, 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80,
451 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80, 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80,
452 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80, 255,0,0,80, 0,255,0,80, 0,0,255,80, 0,0,0,80,
453 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80, 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80,
454 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80, 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80,
455 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80, 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80,
456 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80, 0,255,255,80, 255,0,255,80, 255,255,0,80, 255,255,255,80,
457 3,3,3,80, 6,6,6,80, 12,12,12,80, 15,15,15,80, 19,19,19,80, 22,22,22,80, 28,28,28,80, 31,31,31,80,
458 35,35,35,80, 38,38,38,80, 41,41,41,80, 47,47,47,80, 47,47,47,80, 54,54,54,80, 57,57,57,80, 63,63,63,80,
459 66,66,66,80, 70,70,70,80, 73,73,73,80, 79,79,79,80, 82,82,82,80, 86,86,86,80, 89,89,89,80, 95,95,95,80,
460 98,98,98,80, 98,98,98,80, 105,105,105,80, 108,108,108,80, 114,114,114,80, 117,117,117,80, 121,121,121,80, 124,124,124,80,
461 130,130,130,80, 133,133,133,80, 137,137,137,80, 140,140,140,80, 146,146,146,80, 149,149,149,80, 156,156,156,80, 156,156,156,80,
462 159,159,159,80, 165,165,165,80, 168,168,168,80, 172,172,172,80, 175,175,175,80, 181,181,181,80, 184,184,184,80, 188,188,188,80,
463 191,191,191,80, 197,197,197,80, 200,200,200,80, 207,207,207,80, 207,207,207,80, 213,213,213,80, 216,216,216,80, 219,219,219,80,
464 223,223,223,80, 226,226,226,80, 232,232,232,80, 235,235,235,80, 239,239,239,80, 242,242,242,80, 248,248,248,80, 251,251,251,80};
466 &GUID_WICPixelFormat32bppBGR, 32,
bits_32bppBGR, 32, 2, 96.0, 96.0};
468 &GUID_WICPixelFormat32bppBGRA, 32,
bits_32bppBGR, 32, 4, 96.0, 96.0};
470 &GUID_WICPixelFormat32bppRGBA, 32,
bits_32bppBGR, 32, 4, 96.0, 96.0};
473 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255, 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255,
474 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255, 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255,
475 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255, 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255,
476 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255, 255,0,0,255, 0,255,0,255, 0,0,255,255, 0,0,0,255,
477 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255,
478 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255,
479 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255,
480 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255, 0,255,255,255, 255,0,255,255, 255,255,0,255, 255,255,255,255,
481 3,3,3,255, 6,6,6,255, 12,12,12,255, 15,15,15,255, 19,19,19,255, 22,22,22,255, 28,28,28,255, 31,31,31,80,
482 35,35,35,255, 38,38,38,255, 41,41,41,255, 47,47,47,255, 47,47,47,255, 54,54,54,255, 57,57,57,255, 63,63,63,80,
483 66,66,66,255, 70,70,70,255, 73,73,73,255, 79,79,79,255, 82,82,82,255, 86,86,86,255, 89,89,89,255, 95,95,95,80,
484 98,98,98,255, 98,98,98,255, 105,105,105,255, 108,108,108,255, 114,114,114,255, 117,117,117,255, 121,121,121,255, 124,124,124,80,
485 130,130,130,255, 133,133,133,255, 137,137,137,255, 140,140,140,255, 146,146,146,255, 149,149,149,255, 156,156,156,255, 156,156,156,80,
486 159,159,159,255, 165,165,165,255, 168,168,168,255, 172,172,172,255, 175,175,175,255, 181,181,181,255, 184,184,184,255, 188,188,188,80,
487 191,191,191,255, 197,197,197,255, 200,200,200,255, 207,207,207,255, 207,207,207,255, 213,213,213,255, 216,216,216,255, 219,219,219,80,
488 223,223,223,255, 226,226,226,255, 232,232,232,255, 235,235,235,255, 239,239,239,255, 242,242,242,255, 248,248,248,255, 251,251,251,80};
490 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255,
491 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255,
492 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255,
493 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255, 0,0,255,255, 0,255,0,255, 255,0,0,255, 0,0,0,255,
494 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255,
495 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255,
496 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255,
497 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255, 255,255,0,255, 255,0,255,255, 0,255,255,255, 255,255,255,255};
500 &GUID_WICPixelFormat32bppBGRA, 32,
bits_32bppBGRA, 32, 2, 96.0, 96.0};
502 &GUID_WICPixelFormat32bppRGBA, 32,
bits_32bppRGBA, 32, 2, 96.0, 96.0};
504 &GUID_WICPixelFormat32bppRGB, 32,
bits_32bppRGBA, 32, 2, 96.0, 96.0};
507 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80,
508 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80,
509 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80,
510 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80, 80,0,0,80, 0,80,0,80, 0,0,80,80, 0,0,0,80,
511 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80,
512 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80,
513 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80,
514 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80, 0,80,80,80, 80,0,80,80, 80,80,0,80, 80,80,80,80,
515 1,1,1,80, 2,2,2,80, 4,4,4,80, 5,5,5,80, 6,6,6,80, 7,7,7,80, 9,9,9,80, 10,10,10,80,
516 11,11,11,80, 12,12,12,80, 13,13,13,80, 15,15,15,80, 15,15,15,80, 17,17,17,80, 18,18,18,80, 20,20,20,80,
517 21,21,21,80, 22,22,22,80, 23,23,23,80, 25,25,25,80, 26,26,26,80, 27,27,27,80, 28,28,28,80, 30,30,30,80,
518 31,31,31,80, 31,31,31,80, 33,33,33,80, 34,34,34,80, 36,36,36,80, 37,37,37,80, 38,38,38,80, 39,39,39,80,
519 41,41,41,80, 42,42,42,80, 43,43,43,80, 44,44,44,80, 46,46,46,80, 47,47,47,80, 49,49,49,80, 49,49,49,80,
520 50,50,50,80, 52,52,52,80, 53,53,53,80, 54,54,54,80, 55,55,55,80, 57,57,57,80, 58,58,58,80, 59,59,59,80,
521 60,60,60,80, 62,62,62,80, 63,63,63,80, 65,65,65,80, 65,65,65,80, 67,67,67,80, 68,68,68,80, 69,69,69,80,
522 70,70,70,80, 71,71,71,80, 73,73,73,80, 74,74,74,80, 75,75,75,80, 76,76,76,80, 78,78,78,80, 79,79,79,80};
524 &GUID_WICPixelFormat32bppPBGRA, 32,
bits_32bppPBGRA, 32, 4, 96.0, 96.0};
526 &GUID_WICPixelFormat32bppPRGBA, 32,
bits_32bppPBGRA, 32, 4, 96.0, 96.0};
529 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255,
530 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255,
531 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255,
532 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255, 128,0,128,0,128,255,128,255, 128,0,128,255,128,0,128,255, 128,255,128,0,128,0,128,255, 128,0,128,0,128,0,128,255,
533 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255,
534 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255,
535 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255,
536 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255, 128,255,128,255,128,0,128,255, 128,255,128,0,128,255,128,255, 128,0,128,255,128,255,128,255, 128,255,128,255,128,255,128,255};
538 &GUID_WICPixelFormat64bppRGBA, 64,
bits_64bppRGBA, 32, 2, 96.0, 96.0};
542 0.114000f,0.587000f,0.299000f,0.000000f,0.114000f,0.587000f,0.299000f,0.000000f,
543 0.114000f,0.587000f,0.299000f,0.000000f,0.114000f,0.587000f,0.299000f,0.000000f,
544 0.114000f,0.587000f,0.299000f,0.000000f,0.114000f,0.587000f,0.299000f,0.000000f,
545 0.114000f,0.587000f,0.299000f,0.000000f,0.114000f,0.587000f,0.299000f,0.000000f,
546 0.886000f,0.413000f,0.701000f,1.000000f,0.886000f,0.413000f,0.701000f,1.000000f,
547 0.886000f,0.413000f,0.701000f,1.000000f,0.886000f,0.413000f,0.701000f,1.000000f,
548 0.886000f,0.413000f,0.701000f,1.000000f,0.886000f,0.413000f,0.701000f,1.000000f,
549 0.886000f,0.413000f,0.701000f,1.000000f,0.886000f,0.413000f,0.701000f,1.000000f};
554 0.072200f,0.715200f,0.212600f,0.000000f,0.072200f,0.715200f,0.212600f,0.000000f,
555 0.072200f,0.715200f,0.212600f,0.000000f,0.072200f,0.715200f,0.212600f,0.000000f,
556 0.072200f,0.715200f,0.212600f,0.000000f,0.072200f,0.715200f,0.212600f,0.000000f,
557 0.072200f,0.715200f,0.212600f,0.000000f,0.072200f,0.715200f,0.212600f,0.000000f,
558 0.927800f,0.284800f,0.787400f,1.000000f,0.927800f,0.284800f,0.787400f,1.000000f,
559 0.927800f,0.284800f,0.787400f,1.000000f,0.927800f,0.284800f,0.787400f,1.000000f,
560 0.927800f,0.284800f,0.787400f,1.000000f,0.927800f,0.284800f,0.787400f,1.000000f,
561 0.927800f,0.284800f,0.787400f,1.000000f,0.927800f,0.284800f,0.787400f,1.000000f};
566 77,112,77,112,77,112,77,112,77,112,77,112,77,112,77,112,249,
567 239,249,239,249,239,249,239,249,239,249,239,249,239,249,239};
572 77,112,77,112,77,112,77,112,77,112,77,112,77,112,77,112,249,
573 239,249,239,249,239,249,239,249,239,249,239,249,239,249,239};
578 29,150,76,0,29,150,76,0,29,150,76,0,29,150,76,0,
579 29,150,76,0,29,150,76,0,29,150,76,0,29,150,76,0,
580 226,105,179,255,226,105,179,255,226,105,179,255,226,105,179,255,
581 226,105,179,255,226,105,179,255,226,105,179,255,226,105,179,255};
586 76,220,127,0,76,220,127,0,76,220,127,0,76,220,127,0,
587 76,220,127,0,76,220,127,0,76,220,127,0,76,220,127,0,
588 247,145,230,255,247,145,230,255,247,145,230,255,247,145,230,255,
589 247,145,230,255,247,145,230,255,247,145,230,255,247,145,230,255};
594 76,76,76, 220,220,220, 127,127,127, 0,0,0, 76,76,76, 220,220,220, 127,127,127, 0,0,0,
595 76,76,76, 220,220,220, 127,127,127, 0,0,0, 76,76,76, 220,220,220, 127,127,127, 0,0,0,
596 76,76,76, 220,220,220, 127,127,127, 0,0,0, 76,76,76, 220,220,220, 127,127,127, 0,0,0,
597 76,76,76, 220,220,220, 127,127,127, 0,0,0, 76,76,76, 220,220,220, 127,127,127, 0,0,0,
598 247,247,247, 145,145,145, 230,230,230, 255,255,255, 247,247,247, 145,145,145, 230,230,230, 255,255,255,
599 247,247,247, 145,145,145, 230,230,230, 255,255,255, 247,247,247, 145,145,145, 230,230,230, 255,255,255,
600 247,247,247, 145,145,145, 230,230,230, 255,255,255, 247,247,247, 145,145,145, 230,230,230, 255,255,255,
601 247,247,247, 145,145,145, 230,230,230, 255,255,255, 247,247,247, 145,145,145, 230,230,230, 255,255,255};
605#define TO_16bppBGRA5551(b,g,r,a) ( \
613 TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
614 TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
615 TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
616 TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
TO_16bppBGRA5551(255,0,0,255),
TO_16bppBGRA5551(0,255,0,255),
TO_16bppBGRA5551(0,0,255,255),
TO_16bppBGRA5551(0,0,0,255),
617 TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255),
TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255),
618 TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255),
TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255),
619 TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255),
TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255),
620 TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255),
TO_16bppBGRA5551(0,255,255,255),
TO_16bppBGRA5551(255,0,255,255),
TO_16bppBGRA5551(255,255,0,255),
TO_16bppBGRA5551(255,255,255,255)};
626 0,0,0, 0,65535,0, 32767,32768,32767,
627 65535,65535,65535, 10,10,10, 0,0,10};
633 0,0,0,65535, 0,65535,0,65535, 32767,32768,32767,65535,
634 65535,65535,65535,65535, 10,10,10,65535, 0,0,10,65535,};
656 IWICBitmapSource_Release(dst_bitmap);
687 &IID_IWICFormatConverter, (
void**)&converter);
691 hr = IWICFormatConverter_CanConvert(converter, &GUID_WICPixelFormat32bppBGRA,
692 &GUID_WICPixelFormat32bppBGR, &can_convert);
694 ok(can_convert,
"expected TRUE, got %i\n", can_convert);
704 IWICFormatConverter_Release(converter);
720 &IID_IWICFormatConverter, (
void**)&converter);
724 hr = IWICFormatConverter_CanConvert(converter, &GUID_WICPixelFormat32bppBGRA,
725 &GUID_WICPixelFormat4bppGray, &can_convert);
727 todo_wine ok(can_convert,
"expected TRUE, got %i\n", can_convert);
737 IWICFormatConverter_Release(converter);
753 &IID_IWICFormatConverter, (
void**)&converter);
757 hr = IWICFormatConverter_CanConvert(converter, &GUID_WICPixelFormat32bppBGRA,
758 &GUID_WICPixelFormat8bppGray, &can_convert);
760 ok(can_convert,
"expected TRUE, got %i\n", can_convert);
770 IWICFormatConverter_Release(converter);
786static const WCHAR wszTiffCompressionMethod[] = {
'T',
'i',
'f',
'f',
'C',
'o',
'm',
'p',
'r',
'e',
's',
's',
'i',
'o',
'n',
'M',
'e',
't',
'h',
'o',
'd',0};
787static const WCHAR wszCompressionQuality[] = {
'C',
'o',
'm',
'p',
'r',
'e',
's',
's',
'i',
'o',
'n',
'Q',
'u',
'a',
'l',
'i',
't',
'y',0};
788static const WCHAR wszInterlaceOption[] = {
'I',
'n',
't',
'e',
'r',
'l',
'a',
'c',
'e',
'O',
'p',
't',
'i',
'o',
'n',0};
789static const WCHAR wszFilterOption[] = {
'F',
'i',
'l',
't',
'e',
'r',
'O',
'p',
't',
'i',
'o',
'n',0};
790static const WCHAR wszImageQuality[] = {
'I',
'm',
'a',
'g',
'e',
'Q',
'u',
'a',
'l',
'i',
't',
'y',0};
791static const WCHAR wszBitmapTransform[] = {
'B',
'i',
't',
'm',
'a',
'p',
'T',
'r',
'a',
'n',
's',
'f',
'o',
'r',
'm',0};
793static const WCHAR wszChrominance[] = {
'C',
'h',
'r',
'o',
'm',
'i',
'n',
'a',
'n',
'c',
'e',0};
794static const WCHAR wszJpegYCrCbSubsampling[] = {
'J',
'p',
'e',
'g',
'Y',
'C',
'r',
'C',
'b',
'S',
'u',
'b',
's',
'a',
'm',
'p',
'l',
'i',
'n',
'g',0};
795static const WCHAR wszSuppressApp0[] = {
'S',
'u',
'p',
'p',
'r',
'e',
's',
's',
'A',
'p',
'p',
'0',0};
796static const WCHAR wszEnableV5Header32bppBGRA[] = {
'E',
'n',
'a',
'b',
'l',
'e',
'V',
'5',
'H',
'e',
'a',
'd',
'e',
'r',
'3',
'2',
'b',
'p',
'p',
'B',
'G',
'R',
'A',0};
828 for (
i=0;
i < all_prop_cnt;
i++)
849 hr = IPropertyBag2_Read(
options, 1, &pb,
NULL, &pvarValue, &phrError);
858 ok(
idx >= 0,
"Property %s not in output of GetPropertyInfo\n",
864 ok(all_props[
idx].dwType == PROPBAG2_TYPE_DATA,
"Property %s has unexpected dw type, vt=%li\n",
866 ok(all_props[
idx].cfType == 0,
"Property %s has unexpected cf type, vt=%i\n",
870 ok(
SUCCEEDED(
hr),
"Reading property %s from bag failed, hr=%lx\n",
877 "Property %s has unexpected initial type, V_VT=%i\n",
890 ok(
V_UNION(&pvarValue, fltVal) ==
data[
i].
f_init_val,
"Property %s has an unexpected initial value, pvarValue=%f\n",
908 ULONG cProperties = 0;
909 ULONG cProperties2 = 0;
910 PROPBAG2 all_props[64] = {{0}};
915 hr = IPropertyBag2_CountProperties(
options, &cProperties);
921 hr = IPropertyBag2_GetPropertyInfo(
options, cProperties, 1, all_props, &cProperties2);
924 hr = IPropertyBag2_GetPropertyInfo(
options, 0, cProperties+1, all_props, &cProperties2);
927 if (cProperties == 0)
929 cProperties2 = cProperties;
934 hr = IPropertyBag2_GetPropertyInfo(
options, 0,
min(64, cProperties), all_props, &cProperties2);
935 ok(
SUCCEEDED(
hr),
"Reading infos from property bag failed, hr=%lx\n",
hr);
941 ok(cProperties == cProperties2,
"Mismatch of property count (IPropertyBag2::CountProperties=%i, IPropertyBag2::GetPropertyInfo=%i)\n",
942 (
int)cProperties, (
int)cProperties2);
947 else if (
IsEqualCLSID(clsid_encoder, &CLSID_WICPngEncoder))
949 else if (
IsEqualCLSID(clsid_encoder, &CLSID_WICJpegEncoder))
951 else if (
IsEqualCLSID(clsid_encoder, &CLSID_WICBmpEncoder))
954 for (
i=0;
i < cProperties2;
i++)
956 ok(all_props[
i].pstrName !=
NULL,
"Unset property name in output of IPropertyBag2::GetPropertyInfo\n");
966 hr = IUnknown_QueryInterface(
reader, &IID_IWICPersistStream, (
void **)&persist);
967 ok(
hr ==
S_OK,
"QueryInterface failed, hr=%lx\n",
hr);
969 hr = IWICPersistStream_LoadEx(persist,
stream,
NULL, 0);
970 ok(
hr ==
S_OK,
"LoadEx failed, hr=%lx\n",
hr);
972 IWICPersistStream_Release(persist);
994 { 0x100, &
width }, { 0x101, &
height }, { 0x102, &bps },
995 { 0x106, &photo }, { 0x115, &
samples }, { 0x140, &colormap }
1000 ok(
hr ==
S_OK,
"IStream_Read error %#lx\n",
hr);
1002 "wrong TIFF byte order mark %02x\n",
tiff.byte_order);
1003 ok(
tiff.version == 42,
"wrong TIFF version %u\n",
tiff.version);
1005 pos.QuadPart =
tiff.dir_offset;
1007 ok(
hr ==
S_OK,
"IStream_Seek error %#lx\n",
hr);
1010 &IID_IWICMetadataReader, (
void **)&
reader);
1011 ok(
hr ==
S_OK,
"CoCreateInstance error %#lx\n",
hr);
1021 PropVariantInit(&
id);
1022 PropVariantInit(&
value);
1025 id.uiVal =
tag[
i].id;
1028 "GetValue(%04x) error %#lx\n",
tag[
i].
id,
hr);
1035 tag[
i].value[0] = -1;
1040 IWICMetadataReader_Release(
reader);
1047 ok(bps == 1,
"wrong bps %d\n", bps);
1048 ok(photo == 1,
"wrong photometric %d\n", photo);
1050 ok(colormap == -1,
"wrong colormap %d\n", colormap);
1057 ok(bps == 1,
"wrong bps %d\n", bps);
1058 ok(photo == 3,
"wrong photometric %d\n", photo);
1060 ok(colormap == 6,
"wrong colormap %d\n", colormap);
1067 ok(bps == 4,
"wrong bps %d\n", bps);
1068 ok(photo == 3,
"wrong photometric %d\n", photo);
1070 ok(colormap == 48,
"wrong colormap %d\n", colormap);
1077 ok(bps == 8,
"wrong bps %d\n", bps);
1078 ok(photo == 3,
"wrong photometric %d\n", photo);
1080 ok(colormap == 768,
"wrong colormap %d\n", colormap);
1087 ok(bps == 3,
"wrong bps %d\n", bps);
1088 ok(photo == 2,
"wrong photometric %d\n", photo);
1090 ok(colormap == -1,
"wrong colormap %d\n", colormap);
1103 ok(
hr ==
S_OK,
"IStream_Read error %#lx\n",
hr);
1105 ok(bfh.
bfType == 0x4d42,
"wrong BMP signature %02x\n", bfh.
bfType);
1110 ok(
hr ==
S_OK,
"IStream_Read error %#lx\n",
hr);
1116 ok(bih.bV5Width == 32,
"wrong width %lu\n", bih.bV5Width);
1117 ok(bih.bV5Height == 2,
"wrong height %lu\n", bih.bV5Height);
1119 ok(bih.bV5Planes == 1,
"wrong Planes %d\n", bih.bV5Planes);
1120 ok(bih.bV5BitCount == 1,
"wrong BitCount %d\n", bih.bV5BitCount);
1121 ok(bih.bV5ClrUsed == 256,
"wrong ClrUsed %ld\n", bih.bV5ClrUsed);
1122 ok(bih.bV5ClrImportant == 256,
"wrong ClrImportant %ld\n", bih.bV5ClrImportant);
1128 ok(bih.bV5Width == 32,
"wrong width %lu\n", bih.bV5Width);
1129 ok(bih.bV5Height == 2,
"wrong height %lu\n", bih.bV5Height);
1131 ok(bih.bV5Planes == 1,
"wrong Planes %d\n", bih.bV5Planes);
1132 ok(bih.bV5BitCount == 4,
"wrong BitCount %d\n", bih.bV5BitCount);
1133 ok(bih.bV5ClrUsed == 256,
"wrong ClrUsed %ld\n", bih.bV5ClrUsed);
1134 ok(bih.bV5ClrImportant == 256,
"wrong ClrImportant %ld\n", bih.bV5ClrImportant);
1140 ok(bih.bV5Width == 32,
"wrong width %lu\n", bih.bV5Width);
1141 ok(bih.bV5Height == 2,
"wrong height %lu\n", bih.bV5Height);
1143 ok(bih.bV5Planes == 1,
"wrong Planes %d\n", bih.bV5Planes);
1144 ok(bih.bV5BitCount == 8,
"wrong BitCount %d\n", bih.bV5BitCount);
1145 ok(bih.bV5ClrUsed == 256,
"wrong ClrUsed %ld\n", bih.bV5ClrUsed);
1146 ok(bih.bV5ClrImportant == 256,
"wrong ClrImportant %ld\n", bih.bV5ClrImportant);
1152 ok(bih.bV5Width == 32,
"wrong width %lu\n", bih.bV5Width);
1153 ok(bih.bV5Height == 2,
"wrong height %lu\n", bih.bV5Height);
1155 ok(bih.bV5Planes == 1,
"wrong Planes %d\n", bih.bV5Planes);
1156 ok(bih.bV5BitCount == 32,
"wrong BitCount %d\n", bih.bV5BitCount);
1157 ok(bih.bV5ClrUsed == 0,
"wrong ClrUsed %ld\n", bih.bV5ClrUsed);
1158 ok(bih.bV5ClrImportant == 0,
"wrong ClrImportant %ld\n", bih.bV5ClrImportant);
1173 return (
u.c[0] << 24) | (
u.c[1] << 16) | (
u.c[2] << 8) |
u.c[3];
1178 static const char png_sig[8] = {0x89,
'P',
'N',
'G',0x0d,0x0a,0x1a,0x0a};
1179 static const char png_IHDR[8] = {0,0,0,0x0d,
'I',
'H',
'D',
'R'};
1189 memset(&png, 0,
sizeof(png));
1191 ok(
hr ==
S_OK,
"IStream_Read error %#lx\n",
hr);
1193 ok(!
memcmp(png.png_sig, png_sig,
sizeof(png_sig)),
"expected PNG signature\n");
1201 ok(png.bit_depth == 1,
"wrong bit_depth %d\n", png.bit_depth);
1202 ok(png.color_type == 0,
"wrong color_type %d\n", png.color_type);
1203 ok(png.compression == 0,
"wrong compression %d\n", png.compression);
1204 ok(png.filter == 0,
"wrong filter %d\n", png.filter);
1205 ok(png.interlace == 0,
"wrong interlace %d\n", png.interlace);
1212 ok(png.bit_depth == 1,
"wrong bit_depth %d\n", png.bit_depth);
1213 ok(png.color_type == 3,
"wrong color_type %d\n", png.color_type);
1214 ok(png.compression == 0,
"wrong compression %d\n", png.compression);
1215 ok(png.filter == 0,
"wrong filter %d\n", png.filter);
1216 ok(png.interlace == 0,
"wrong interlace %d\n", png.interlace);
1223 ok(png.bit_depth == 2,
"wrong bit_depth %d\n", png.bit_depth);
1224 ok(png.color_type == 3,
"wrong color_type %d\n", png.color_type);
1225 ok(png.compression == 0,
"wrong compression %d\n", png.compression);
1226 ok(png.filter == 0,
"wrong filter %d\n", png.filter);
1227 ok(png.interlace == 0,
"wrong interlace %d\n", png.interlace);
1234 ok(png.bit_depth == 4,
"wrong bit_depth %d\n", png.bit_depth);
1235 ok(png.color_type == 3,
"wrong color_type %d\n", png.color_type);
1236 ok(png.compression == 0,
"wrong compression %d\n", png.compression);
1237 ok(png.filter == 0,
"wrong filter %d\n", png.filter);
1238 ok(png.interlace == 0,
"wrong interlace %d\n", png.interlace);
1245 ok(png.bit_depth == 8,
"wrong bit_depth %d\n", png.bit_depth);
1246 ok(png.color_type == 3,
"wrong color_type %d\n", png.color_type);
1247 ok(png.compression == 0,
"wrong compression %d\n", png.compression);
1248 ok(png.filter == 0,
"wrong filter %d\n", png.filter);
1249 ok(png.interlace == 0,
"wrong interlace %d\n", png.interlace);
1256 ok(png.bit_depth == 8,
"wrong bit_depth %d\n", png.bit_depth);
1257 ok(png.color_type == 2,
"wrong color_type %d\n", png.color_type);
1258 ok(png.compression == 0,
"wrong compression %d\n", png.compression);
1259 ok(png.filter == 0,
"wrong filter %d\n", png.filter);
1260 ok(png.interlace == 0 || png.interlace == 1,
"wrong interlace %d\n", png.interlace);
1268#include "pshpack1.h"
1284 UINT color_resolution;
1287 memset(&lsd, 0,
sizeof(lsd));
1289 ok(
hr ==
S_OK,
"IStream_Read error %#lx\n",
hr);
1291 ok(!
memcmp(lsd.signature,
"GIF89a", 6),
"wrong GIF signature %.6s\n", lsd.signature);
1293 ok(lsd.width == 32,
"wrong width %u\n", lsd.width);
1294 ok(lsd.height == 2,
"wrong height %u\n", lsd.height);
1295 color_resolution = 1 << (((lsd.packed >> 4) & 0x07) + 1);
1296 ok(color_resolution == 256,
"wrong color resolution %u\n", color_resolution);
1297 ok(lsd.pixel_aspect_ratio == 0,
"wrong pixel_aspect_ratio %u\n", lsd.pixel_aspect_ratio);
1307 ok(
hr ==
S_OK,
"IStream_Seek error %#lx\n",
hr);
1321 ok(
hr ==
S_OK,
"IStream_Seek error %#lx\n",
hr);
1331#define EXPECT_REF(obj,ref) _expect_ref((IUnknown*)obj, ref, __LINE__)
1335 IUnknown_AddRef(
obj);
1336 rc = IUnknown_Release(
obj);
1337 ok_(__FILE__,
line)(rc ==
ref,
"expected refcount %ld, got %ld\n",
ref, rc);
1347 &IID_IWICComponentFactory, (
void **)&
factory);
1348 ok(
hr ==
S_OK,
"CoCreateInstance failed, hr=%lx\n",
hr);
1350 hr = IWICBitmapFrameEncode_SetPalette(frameencode,
NULL);
1354 ok(
hr ==
S_OK,
"CreatePalette failed, hr=%lx\n",
hr);
1356 hr = IWICBitmapFrameEncode_SetPalette(frameencode,
palette);
1361 ok(
hr ==
S_OK,
"InitializePredefined failed, hr=%lx\n",
hr);
1364 hr = IWICBitmapFrameEncode_SetPalette(frameencode,
palette);
1365 ok(
hr ==
S_OK,
"SetPalette failed, hr=%lx\n",
hr);
1368 hr = IWICBitmapFrameEncode_SetPalette(frameencode,
NULL);
1372 IWICComponentFactory_Release(
factory);
1379 const GUID *container_format =
NULL;
1394 &IID_IWICBitmapEncoder, (
void **)&
encoder);
1403 if (
IsEqualGUID(clsid_encoder, &CLSID_WICPngEncoder))
1404 container_format = &GUID_ContainerFormatPng;
1405 else if (
IsEqualGUID(clsid_encoder, &CLSID_WICBmpEncoder))
1406 container_format = &GUID_ContainerFormatBmp;
1407 else if (
IsEqualGUID(clsid_encoder, &CLSID_WICTiffEncoder))
1408 container_format = &GUID_ContainerFormatTiff;
1409 else if (
IsEqualGUID(clsid_encoder, &CLSID_WICJpegEncoder))
1410 container_format = &GUID_ContainerFormatJpeg;
1411 else if (
IsEqualGUID(clsid_encoder, &CLSID_WICGifEncoder))
1412 container_format = &GUID_ContainerFormatGif;
1416 if (container_format)
1428 hr = IWICBitmapEncoder_CreateNewFrame(
encoder, &frameencode,
NULL);
1432 IWICBitmapEncoder_Release(
encoder);
1433 IWICBitmapFrameEncode_Release(frameencode);
1436 &IID_IWICBitmapEncoder, (
void**)&
encoder);
1441 ok(hglobal !=
NULL,
"GlobalAlloc failed\n");
1462 if (
IsEqualGUID(clsid_encoder, &CLSID_WICGifEncoder))
1463 ok(
hr ==
S_OK,
"SetPalette failed, hr=%#lx\n",
hr);
1478 ok(
options !=
NULL,
"Encoder initialization has not created an property bag\n");
1490 memset(&propbag, 0,
sizeof(propbag));
1504 hr = IWICBitmapFrameEncode_SetPalette(frameencode,
palette);
1508 hr = IWICBitmapFrameEncode_Initialize(frameencode,
options);
1512 hr = IWICBitmapFrameEncode_SetPixelFormat(frameencode, &
pixelformat);
1521 hr = IWICBitmapFrameEncode_SetSize(frameencode, srcs[
i]->
width, srcs[
i]->
height);
1522 ok(
hr ==
S_OK,
"SetSize failed, hr=%lx\n",
hr);
1525 if (
IsEqualGUID(clsid_encoder, &CLSID_WICPngEncoder))
1530 hr = IWICBitmapFrameEncode_SetPalette(frameencode,
palette);
1544 "WriteSource_Proxy(%dx%d) got unexpected hr %lx (%s)\n", rc->
Width, rc->
Height,
hr,
name);
1554 (
IsEqualGUID(clsid_encoder, &CLSID_WICBmpEncoder) && srcs[
i]->
bpp == 2))
1555 ok(
hr ==
S_OK,
"WriteSource(NULL) failed, hr=%lx (%s)\n",
hr,
name);
1561 hr = IWICBitmapFrameEncode_Commit(frameencode);
1569 IWICBitmapFrameEncode_Release(frameencode);
1570 IPropertyBag2_Release(
options);
1578 if (clsid_decoder ==
NULL)
1581 IWICBitmapEncoder_Release(
encoder);
1597 &IID_IWICBitmapDecoder, (
void**)&
decoder);
1605 hr = IWICImagingFactory_CreatePalette(
factory, &frame_palette);
1606 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
1608 hr = IWICBitmapDecoder_CopyPalette(
decoder, frame_palette);
1609 if (
IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder))
1617 hr = IWICBitmapDecoder_CopyPalette(
decoder, frame_palette);
1618 if (
IsEqualGUID(clsid_decoder, &CLSID_WICGifDecoder))
1627 hr = IWICBitmapDecoder_GetFrame(
decoder,
i, &framedecode);
1632 hr = IWICBitmapFrameDecode_GetPixelFormat(framedecode, &
pixelformat);
1633 ok(
hr ==
S_OK,
"GetPixelFormat) failed, hr=%lx (%s)\n",
hr,
name);
1637 hr = IWICBitmapFrameDecode_CopyPalette(framedecode, frame_palette);
1650 hr = IWICPalette_GetColorCount(frame_palette, &
count);
1651 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
1653 memset(colors, 0,
sizeof(colors));
1655 hr = IWICPalette_GetColors(frame_palette,
count, colors, &
ret);
1656 ok(
hr ==
S_OK,
"GetColors error %#lx\n",
hr);
1658 if (
IsEqualGUID(clsid_decoder, &CLSID_WICPngDecoder))
1665 "expected 256, got %u (%s)\n",
count,
name);
1667 ok(colors[0] == 0x11111111,
"got %08x (%s)\n", colors[0],
name);
1668 ok(colors[1] == 0x22222222,
"got %08x (%s)\n", colors[1],
name);
1671 ok(colors[2] == 0x33333333,
"got %08x (%s)\n", colors[2],
name);
1672 ok(colors[3] == 0x44444444,
"got %08x (%s)\n", colors[3],
name);
1675 ok(colors[4] == 0x55555555,
"got %08x (%s)\n", colors[4],
name);
1676 ok(colors[5] == 0,
"got %08x (%s)\n", colors[5],
name);
1680 else if (
IsEqualGUID(clsid_decoder, &CLSID_WICBmpDecoder) ||
1681 IsEqualGUID(clsid_decoder, &CLSID_WICTiffDecoder) ||
1689 ok(colors[0] == 0xff111111,
"got %08x (%s)\n", colors[0],
name);
1690 ok(colors[1] == 0xff222222,
"got %08x (%s)\n", colors[1],
name);
1691 ok(colors[2] == 0xff333333,
"got %08x (%s)\n", colors[2],
name);
1692 ok(colors[3] == 0xff444444,
"got %08x (%s)\n", colors[3],
name);
1693 ok(colors[4] == 0xff555555,
"got %08x (%s)\n", colors[4],
name);
1694 ok(colors[5] == 0xff000000,
"got %08x (%s)\n", colors[5],
name);
1700 ok(colors[0] == 0xff111111,
"got %08x (%s)\n", colors[0],
name);
1701 ok(colors[1] == 0xff222222,
"got %08x (%s)\n", colors[1],
name);
1702 ok(colors[2] == 0xff333333,
"got %08x (%s)\n", colors[2],
name);
1703 ok(colors[3] == 0xff444444,
"got %08x (%s)\n", colors[3],
name);
1704 ok(colors[4] == 0xff555555,
"got %08x (%s)\n", colors[4],
name);
1705 ok(colors[5] == 0xff000000,
"got %08x (%s)\n", colors[5],
name);
1711 ok(colors[0] == 0xff111111,
"got %08x (%s)\n", colors[0],
name);
1712 ok(colors[1] == 0xff222222,
"got %08x (%s)\n", colors[1],
name);
1719 ok(colors[0] == 0xff111111,
"got %08x\n", colors[0]);
1720 ok(colors[1] == 0xff222222,
"got %08x\n", colors[1]);
1724 IWICBitmapFrameDecode_Release(framedecode);
1730 IWICPalette_Release(frame_palette);
1731 IWICBitmapDecoder_Release(
decoder);
1737 IWICBitmapEncoder_Release(
encoder);
1759 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
1761 memset(colors, 0,
sizeof(colors));
1762 colors[0] = 0x11111111;
1763 colors[1] = 0x22222222;
1764 colors[2] = 0x33333333;
1765 colors[3] = 0x44444444;
1766 colors[4] = 0x55555555;
1768 hr = IWICPalette_InitializeCustom(
palette, colors, 256);
1769 ok(
hr ==
S_OK,
"InitializeCustom error %#lx\n",
hr);
1803 test_multi_encoder(srcs, &CLSID_WICTiffEncoder, dsts, &CLSID_WICTiffDecoder, &rc,
NULL,
"test_encoder_rects width=-1",
NULL);
1807 test_multi_encoder(srcs, &CLSID_WICTiffEncoder, dsts, &CLSID_WICTiffDecoder, &rc,
NULL,
"test_encoder_rects height=0",
NULL);
1810 test_multi_encoder(srcs, &CLSID_WICTiffEncoder, dsts, &CLSID_WICTiffDecoder, &rc,
NULL,
"test_encoder_rects height=-1",
NULL);
1839 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
1842 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
1846 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1847 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1851 ok(
hr ==
S_OK,
"Initialize error %#lx\n",
hr);
1852 hr = IWICFormatConverter_CopyPalette(converter,
palette);
1853 ok(
hr == 0xdeadbeef,
"unexpected error %#lx\n",
hr);
1854 hr = IWICFormatConverter_CopyPixels(converter,
NULL, 32 * 3,
sizeof(
buf),
buf);
1855 ok(
hr ==
S_OK,
"CopyPixels error %#lx\n",
hr);
1856 IWICFormatConverter_Release(converter);
1859 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1860 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1865 hr = IWICFormatConverter_CopyPalette(converter,
palette);
1867 hr = IWICFormatConverter_CopyPixels(converter,
NULL, 32,
sizeof(
buf),
buf);
1869 IWICFormatConverter_Release(converter);
1871 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1872 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1877 IWICFormatConverter_Release(converter);
1879 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1880 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1885 IWICFormatConverter_Release(converter);
1887 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1888 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1893 IWICFormatConverter_Release(converter);
1895 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1896 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1901 IWICFormatConverter_Release(converter);
1903 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1904 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1909 IWICFormatConverter_Release(converter);
1911 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1912 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1917 IWICFormatConverter_Release(converter);
1920 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1921 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1925 ok(
hr ==
S_OK,
"Initialize error %#lx\n",
hr);
1926 hr = IWICFormatConverter_CopyPalette(converter,
palette);
1927 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
1930 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
1933 hr = IWICFormatConverter_CopyPixels(converter,
NULL, 32,
sizeof(
buf),
buf);
1934 ok(
hr ==
S_OK,
"CopyPixels error %#lx\n",
hr);
1936 for (
i = 0;
i < 32 * 2;
i++)
1938 ok(
count == 0,
"expected 0\n");
1939 IWICFormatConverter_Release(converter);
1942 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1943 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1947 ok(
hr ==
S_OK,
"Initialize error %#lx\n",
hr);
1948 hr = IWICFormatConverter_CopyPalette(converter,
palette);
1949 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
1952 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
1954 hr = IWICFormatConverter_CopyPixels(converter,
NULL, 32,
sizeof(
buf),
buf);
1955 ok(
hr ==
S_OK,
"CopyPixels error %#lx\n",
hr);
1957 for (
i = 0;
i < 32 * 2;
i++)
1959 ok(
count != 0,
"expected != 0\n");
1960 IWICFormatConverter_Release(converter);
1963 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1964 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1968 ok(
hr ==
S_OK,
"Initialize error %#lx\n",
hr);
1969 hr = IWICFormatConverter_CopyPalette(converter,
palette);
1970 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
1973 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
1975 hr = IWICFormatConverter_CopyPixels(converter,
NULL, 32,
sizeof(
buf),
buf);
1976 ok(
hr ==
S_OK,
"CopyPixels error %#lx\n",
hr);
1978 for (
i = 0;
i < 32 * 2;
i++)
1980 ok(
count != 0,
"expected != 0\n");
1981 IWICFormatConverter_Release(converter);
1984 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
1985 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
1989 ok(
hr ==
S_OK,
"Initialize error %#lx\n",
hr);
1990 hr = IWICFormatConverter_CopyPalette(converter,
palette);
1991 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
1994 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
1996 hr = IWICFormatConverter_CopyPixels(converter,
NULL, 32,
sizeof(
buf),
buf);
1997 ok(
hr ==
S_OK,
"CopyPixels error %#lx\n",
hr);
1999 for (
i = 0;
i < 32 * 2;
i++)
2001 ok(
count != 0,
"expected != 0\n");
2002 IWICFormatConverter_Release(converter);
2005 hr = IWICImagingFactory_CreateFormatConverter(
factory, &converter);
2006 ok(
hr ==
S_OK,
"CreateFormatConverter error %#lx\n",
hr);
2013 hr = IWICFormatConverter_CopyPalette(converter,
palette);
2014 ok(
hr ==
S_OK,
"CopyPalette error %#lx\n",
hr);
2017 ok(
hr ==
S_OK,
"GetColorCount error %#lx\n",
hr);
2019 hr = IWICFormatConverter_CopyPixels(converter,
NULL, 32,
sizeof(
buf),
buf);
2020 ok(
hr ==
S_OK,
"CopyPixels error %#lx\n",
hr);
2022 for (
i = 0;
i < 32 * 2;
i++)
2024 ok(
count != 0,
"expected != 0\n");
2026 IWICFormatConverter_Release(converter);
2039 &IID_IWICImagingFactory, (
void **)&
factory);
2040 ok(
hr ==
S_OK,
"failed to create factory: %#lx\n",
hr);
2153 IWICImagingFactory_Release(
factory);
struct mke2fs_defaults settings[]
int strcmp(const char *String1, const char *String2)
int memcmp(void *Buffer1, void *Buffer2, ACPI_SIZE Count)
#define InterlockedIncrement
#define InterlockedDecrement
static void set_size(float size)
#define STDMETHODCALLTYPE
_In_ fcb _In_ chunk _In_ uint64_t _In_ uint64_t _In_ bool _In_opt_ void _In_opt_ PIRP _In_ LIST_ENTRY _In_ uint8_t compression
#define HeapFree(x, y, z)
static const WCHAR version[]
int WINAPI lstrcmpW(LPCWSTR str1, LPCWSTR str2)
static REFPROPVARIANT PROPVAR_CHANGE_FLAGS VARTYPE vt
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)
HRESULT WINAPI PropVariantClear(PROPVARIANT *pvar)
HRESULT WINAPI WICConvertBitmapSource(REFWICPixelFormatGUID dstFormat, IWICBitmapSource *pISrc, IWICBitmapSource **ppIDst)
struct png_info_def *typedef unsigned char **typedef struct png_info_def *typedef struct png_info_def *typedef struct png_info_def *typedef unsigned char ** row
GLuint GLuint GLsizei count
GLint GLenum GLsizei GLsizei GLsizei GLint GLsizei const GLvoid * data
GLint GLint GLsizei GLsizei height
GLint GLint GLsizei width
GLboolean GLboolean GLboolean b
GLenum GLuint GLenum GLsizei const GLchar * buf
GLint GLint GLint GLint GLint GLint GLint GLbitfield GLenum filter
GLboolean GLboolean GLboolean GLboolean a
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 * u
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
HGLOBAL NTAPI GlobalAlloc(UINT uFlags, SIZE_T dwBytes)
VOID WINAPI CoTaskMemFree(LPVOID ptr)
_Check_return_ __CRT_INLINE float __CRTDECL fabsf(_In_ float x)
_Check_return_ _CRT_JIT_INTRINSIC double __cdecl fabs(_In_ double x)
#define memcpy(s1, s2, n)
#define todo_wine_if(is_todo)
static const BYTE bits_8bpp_BW[]
static const struct bitmap_data testdata_8bppGray
static const struct property_opt_test_data testdata_jpeg_props[]
static const WCHAR wszImageQuality[]
static void test_set_frame_palette(IWICBitmapFrameEncode *frameencode)
static int find_property_index(const WCHAR *name, PROPBAG2 *all_props, int all_prop_cnt)
static void test_encoder_properties(const CLSID *clsid_encoder, IPropertyBag2 *options)
static HRESULT WINAPI BitmapTestSrc_GetResolution(IWICBitmapSource *iface, double *pDpiX, double *pDpiY)
static const struct bitmap_data testdata_48bppRGB
static void test_converter_4bppGray(void)
static const struct setting png_interlace_settings[]
static const struct bitmap_data testdata_32bppRGBA
static const struct bitmap_data testdata_4bppGray_xp
static const struct bitmap_data testdata_32bppPBGRA
static const struct bitmap_data testdata_32bppGrayFloat_xp
static const struct bitmap_data testdata_BlackWhite
static BOOL is_indexed_format(const GUID *format)
static HRESULT WINAPI BitmapTestSrc_CopyPixels(IWICBitmapSource *iface, const WICRect *prc, UINT cbStride, UINT cbBufferSize, BYTE *pbBuffer)
static const struct bitmap_data testdata_4bppIndexed
static const struct bitmap_data testdata_8bppIndexed_BW
static const BYTE bits_32bppPBGRA[]
static const struct bitmap_data testdata_24bppBGR_gray
static HRESULT WINAPI BitmapTestSrc_GetPixelFormat(IWICBitmapSource *iface, WICPixelFormatGUID *pPixelFormat)
static void CreateTestBitmap(const bitmap_data *data, BitmapTestSrc **This)
static const WCHAR wszInterlaceOption[]
static const struct bitmap_data testdata_32bppPRGBA
static BOOL compare_bits(const struct bitmap_data *expect, UINT buffersize, const BYTE *converted_bits)
static const BYTE bits_8bppGray_xp[]
static void test_multi_encoder(const struct bitmap_data **srcs, const CLSID *clsid_encoder, const struct bitmap_data **dsts, const CLSID *clsid_decoder, WICRect *rc, const struct setting *settings, const char *name, IWICPalette *palette)
static const struct bitmap_data testdata_32bppBGR
static const BYTE bits_32bppBGR[]
static void check_gif_format(IStream *stream, const WICPixelFormatGUID *format)
static unsigned be_uint(unsigned val)
static HRESULT WINAPI BitmapTestSrc_CopyPalette(IWICBitmapSource *iface, IWICPalette *palette)
static const BYTE bits_4bppGray_xp[]
static void test_multi_encoder_impl(const struct bitmap_data **srcs, const CLSID *clsid_encoder, const struct bitmap_data **dsts, const CLSID *clsid_decoder, WICRect *rc, const struct setting *settings, const char *name, IWICPalette *palette, BOOL set_size)
static const struct bitmap_data testdata_32bppGrayFloat
static const float bits_32bppGrayFloat[]
static void _expect_ref(IUnknown *obj, ULONG ref, int line)
static ULONG WINAPI BitmapTestSrc_AddRef(IWICBitmapSource *iface)
static const WCHAR wszChrominance[]
static const struct bitmap_data testdata_64bppRGBA
static const BYTE bits_4bpp[]
static const IWICBitmapSourceVtbl BitmapTestSrc_Vtbl
static void compare_bitmap_data(const struct bitmap_data *src, const struct bitmap_data *expect, IWICBitmapSource *source, const char *name)
static void test_default_converter(void)
static void test_encoder_rects(void)
static const struct bitmap_data testdata_8bppIndexed
static const struct property_opt_test_data testdata_bmp_props[]
static const BYTE bits_1bpp[]
static const BYTE bits_24bppBGR_gray[]
static const struct bitmap_data * single_frame[2]
static void DeleteTestBitmap(BitmapTestSrc *This)
static const struct bitmap_data testdata_8bppIndexed_4colors
static void check_bitmap_format(IStream *stream, const CLSID *encoder, const WICPixelFormatGUID *format)
static IWICImagingFactory * factory
static const WCHAR wszBitmapTransform[]
static const WCHAR wszEnableV5Header32bppBGRA[]
static const struct bitmap_data * multiple_frames[3]
static HRESULT WINAPI BitmapTestSrc_GetSize(IWICBitmapSource *iface, UINT *puiWidth, UINT *puiHeight)
static void check_tiff_format(IStream *stream, const WICPixelFormatGUID *format)
HRESULT STDMETHODCALLTYPE IWICBitmapFrameEncode_WriteSource_Proxy(IWICBitmapFrameEncode *This, IWICBitmapSource *pIBitmapSource, WICRect *prc)
static const BYTE bits_8bpp[]
static const BYTE bits_8bpp_4colors[]
static const BYTE bits_32bppBGRA[]
static const WORD bits_64bppRGBA_2[]
static void test_conversion(const struct bitmap_data *src, const struct bitmap_data *dst, const char *name, BOOL todo)
static const BYTE bits_8bppGray[]
static void test_converter_8bppGray(void)
#define EXPECT_REF(obj, ref)
static const BYTE bits_32bppRGBA[]
static const struct bitmap_data testdata_32bppBGRA80
static const struct bitmap_data testdata_4bppGray
static const BYTE bits_24bppRGB[]
static void check_png_format(IStream *stream, const WICPixelFormatGUID *format)
static void test_invalid_conversion(void)
static void test_specific_encoder_properties(IPropertyBag2 *options, const property_opt_test_data *data, PROPBAG2 *all_props, int all_prop_cnt)
#define TO_16bppBGRA5551(b, g, r, a)
static HRESULT WINAPI BitmapTestSrc_QueryInterface(IWICBitmapSource *iface, REFIID iid, void **ppv)
static BOOL near_equal(float a, float b)
static const struct bitmap_data testdata_24bppRGB
static const struct bitmap_data testdata_16bppBGRA5551
static ULONG WINAPI BitmapTestSrc_Release(IWICBitmapSource *iface)
static const WORD bits_16bppBGRA5551[]
static const struct bitmap_data testdata_2bppIndexed
static const float bits_32bppGrayFloat_xp[]
static const struct bitmap_data testdata_32bppBGRA
static BitmapTestSrc * impl_from_IWICBitmapSource(IWICBitmapSource *iface)
static const WCHAR wszCompressionQuality[]
static const struct property_opt_test_data testdata_png_props[]
static const struct bitmap_data testdata_32bppRGB
static const BYTE bits_64bppRGBA[]
static const BYTE bits_24bppBGR[]
static const struct bitmap_data testdata_1bppIndexed
static void test_encoder(const struct bitmap_data *src, const CLSID *clsid_encoder, const struct bitmap_data *dst, const CLSID *clsid_decoder, const char *name)
static const struct bitmap_data testdata_24bppBGR
static const struct bitmap_data testdata_32bppRGBA80
static void load_stream(IUnknown *reader, IStream *stream)
static const struct bitmap_data testdata_8bppGray_xp
static const WCHAR wszSuppressApp0[]
static void test_converter_8bppIndexed(void)
static const BYTE bits_4bppGray[]
static const struct property_opt_test_data testdata_tiff_props[]
static void check_bmp_format(IStream *stream, const WICPixelFormatGUID *format)
static const WORD bits_48bppRGB[]
static const WCHAR wszFilterOption[]
static const WCHAR wszLuminance[]
static const WCHAR wszJpegYCrCbSubsampling[]
static const WCHAR wszTiffCompressionMethod[]
static const BYTE bits_2bpp[]
static const struct bitmap_data testdata_64bppRGBA_2
@ COINIT_APARTMENTTHREADED
#define IsEqualGUID(rguid1, rguid2)
#define IsEqualIID(riid1, riid2)
#define IsEqualCLSID(rclsid1, rclsid2)
static __inline const char * wine_dbgstr_guid(const GUID *id)
const char * winetest_platform
IWICBitmapSource IWICBitmapSource_iface
const WICPixelFormatGUID * format
const struct bitmap_data * alt_data
BYTE background_color_index
#define CONTAINING_RECORD(address, type, field)
HRESULT WINAPI DECLSPEC_HOTPATCH VariantClear(VARIANTARG *pVarg)
@ WICBitmapEncoderNoCache
@ WICBitmapTransformRotate0
@ WICPngFilterUnspecified
@ WICTiffCompressionDontCare
@ WICBitmapDitherTypeNone
@ WICDecodeMetadataCacheOnDemand
@ WICBitmapPaletteTypeFixedHalftone256
@ WICBitmapPaletteTypeCustom
@ WICBitmapPaletteTypeFixedBW
@ WICBitmapPaletteTypeFixedHalftone64
@ WICBitmapPaletteTypeFixedGray16
@ WICBitmapPaletteTypeMedianCut
@ WICBitmapPaletteTypeFixedHalftone8
@ WICJpegYCrCbSubsamplingDefault
#define WINCODEC_ERR_COMPONENTNOTFOUND
#define WINCODEC_ERR_WRONGSTATE
#define WINCODEC_ERR_UNSUPPORTEDOPERATION
#define WINCODEC_ERR_NOTINITIALIZED
#define WINCODEC_ERR_UNEXPECTEDSIZE
#define WINCODEC_ERR_PALETTEUNAVAILABLE
#define WINCODEC_ERR_SOURCERECTDOESNOTMATCHDIMENSIONS
#define HRESULT_FROM_WIN32(x)
#define ERROR_ARITHMETIC_OVERFLOW
#define WINCODEC_ERR_VALUEOUTOFRANGE
#define WINCODEC_ERR_FRAMEMISSING
#define WINCODEC_ERR_PROPERTYNOTFOUND