413{
415 {
420 BOOL add_transparent;
421 } td[] =
422 {
426 { 0xff000000, 0xff555555, 0xffaaaaaa, 0xffffffff } },
428 { 0xff000000, 0xff555555, 0xffaaaaaa, 0xffffffff }, 1 },
447 };
454
456 ok(
hr ==
S_OK,
"CreatePalette error %#lx\n",
hr);
464
466 {
468 ok(
hr ==
S_OK,
"%u: CreatePalette error %#lx\n",
i,
hr);
469
470 hr = IWICPalette_InitializePredefined(
palette, td[
i].
type, td[
i].add_transparent);
471 ok(
hr ==
S_OK,
"%u: InitializePredefined error %#lx\n",
i,
hr);
472
473 bret = -1;
474 hr = IWICPalette_IsBlackWhite(
palette, &bret);
475 ok(
hr ==
S_OK,
"%u: IsBlackWhite error %#lx\n",
i,
hr);
476 ok(bret == td[
i].is_bw ||
478 "%u: expected %d, got %d\n",
i, td[
i].is_bw, bret);
479
480 bret = -1;
481 hr = IWICPalette_IsGrayscale(
palette, &bret);
482 ok(
hr ==
S_OK,
"%u: IsGrayscale error %#lx\n",
i,
hr);
483 ok(bret == td[
i].is_gray,
"%u: expected %d, got %d\n",
i, td[
i].is_gray, bret);
484
489
492 ok(
hr ==
S_OK,
"%u: GetColorCount error %#lx\n",
i,
hr);
494
496 ok(
hr ==
S_OK,
"%u: GetColors error %#lx\n",
i,
hr);
499 {
501
520
522 {
525 }
526 }
527
529 }
530}
static WICColor * generate_halftone125_palette(UINT *count, BOOL add_transparent)
static WICColor * generate_halftone8_palette(UINT *count, BOOL add_transparent)
static WICColor * generate_gray256_palette(UINT *count)
static WICColor * generate_halftone256_palette(UINT *count, BOOL add_transparent)
static WICColor * generate_gray16_palette(UINT *count)
static WICColor * generate_halftone252_palette(UINT *count, BOOL add_transparent)
static WICColor * generate_halftone216_palette(UINT *count, BOOL add_transparent)
static WICColor * generate_halftone64_palette(UINT *count, BOOL add_transparent)
static WICColor * generate_halftone27_palette(UINT *count, BOOL add_transparent)
@ WICBitmapPaletteTypeFixedHalftone256
@ WICBitmapPaletteTypeFixedGray256
@ WICBitmapPaletteTypeFixedBW
@ WICBitmapPaletteTypeFixedHalftone64
@ WICBitmapPaletteTypeFixedGray16
@ WICBitmapPaletteTypeFixedGray4
@ WICBitmapPaletteTypeFixedHalftone216
@ WICBitmapPaletteTypeFixedHalftone27
@ WICBitmapPaletteTypeMedianCut
@ WICBitmapPaletteTypeFixedHalftone125
@ WICBitmapPaletteTypeFixedHalftone8
@ WICBitmapPaletteTypeFixedHalftone252