windowscodecs: Add support for 32bppCMYK and 64bppCMYK formats to TIFF decoder.

Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Vincent Povirk <vincent@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Dmitry Timoshkov 2020-04-21 12:02:06 +08:00 committed by Alexandre Julliard
parent 462c650ea4
commit 948e5dffcd
2 changed files with 37 additions and 1 deletions

View File

@ -1236,6 +1236,8 @@ static GUID const * const tiff_decode_formats[] = {
&GUID_WICPixelFormat48bppRGB,
&GUID_WICPixelFormat64bppRGBA,
&GUID_WICPixelFormat64bppPRGBA,
&GUID_WICPixelFormat32bppCMYK,
&GUID_WICPixelFormat64bppCMYK,
&GUID_WICPixelFormat128bppRGBAFloat,
NULL
};
@ -2073,6 +2075,17 @@ static struct regsvr_pixelformat const pixelformat_list[] = {
WICPixelFormatNumericRepresentationUnsignedInteger,
0
},
{ &GUID_WICPixelFormat64bppCMYK,
"The Wine Project",
"64bpp CMYK",
NULL, /* no version */
&GUID_VendorMicrosoft,
64, /* bitsperpixel */
4, /* channel count */
channel_masks_16bit,
WICPixelFormatNumericRepresentationUnsignedInteger,
0
},
{ &GUID_WICPixelFormat128bppRGBAFloat,
"The Wine Project",
"128bpp RGBAFloat",

View File

@ -505,8 +505,31 @@ static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info)
return E_NOTIMPL;
}
break;
case 5: /* Separated */
if (samples != 4)
{
FIXME("unhandled Separated sample count %u\n", samples);
return E_FAIL;
}
decode_info->bpp = bps * samples;
switch(bps)
{
case 8:
decode_info->format = &GUID_WICPixelFormat32bppCMYK;
break;
case 16:
decode_info->format = &GUID_WICPixelFormat64bppCMYK;
break;
default:
WARN("unhandled Separated bit count %u\n", bps);
return WINCODEC_ERR_UNSUPPORTEDPIXELFORMAT;
}
break;
case 4: /* Transparency mask */
case 5: /* CMYK */
case 6: /* YCbCr */
case 8: /* CIELab */
default: