Signed-off-by: Dmitry Timoshkov dmitry@baikal.ru --- dlls/windowscodecs/regsvr.c | 13 +++++++++++++ dlls/windowscodecs/tiffformat.c | 25 ++++++++++++++++++++++++- 2 files changed, 37 insertions(+), 1 deletion(-)
diff --git a/dlls/windowscodecs/regsvr.c b/dlls/windowscodecs/regsvr.c index d8147c0e15..3329c2d811 100644 --- a/dlls/windowscodecs/regsvr.c +++ b/dlls/windowscodecs/regsvr.c @@ -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", diff --git a/dlls/windowscodecs/tiffformat.c b/dlls/windowscodecs/tiffformat.c index 984acabfbf..646bcf3822 100644 --- a/dlls/windowscodecs/tiffformat.c +++ b/dlls/windowscodecs/tiffformat.c @@ -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: