Commit 948e5dff authored by Dmitry Timoshkov's avatar Dmitry Timoshkov Committed by Alexandre Julliard

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

parent 462c650e
......@@ -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",
......
......@@ -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:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment