Dmitry Timoshkov : windowscodecs: Add support for 32bppCMYK and 64bppCMYK formats to TIFF decoder.
Alexandre Julliard
julliard at winehq.org
Tue Apr 21 15:59:47 CDT 2020
Module: wine
Branch: master
Commit: 948e5dffcd55fc52fe07188dc454806fd77fd857
URL: https://source.winehq.org/git/wine.git/?a=commit;h=948e5dffcd55fc52fe07188dc454806fd77fd857
Author: Dmitry Timoshkov <dmitry at baikal.ru>
Date: Tue Apr 21 12:02:06 2020 +0800
windowscodecs: Add support for 32bppCMYK and 64bppCMYK formats to TIFF decoder.
Signed-off-by: Dmitry Timoshkov <dmitry at baikal.ru>
Signed-off-by: Vincent Povirk <vincent at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>
---
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:
More information about the wine-cvs
mailing list