[PATCH 0/2] MR7984: libs: Enable JPEG codec in libtiff.
Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7984
From: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- libs/tiff/libtiff/tiffconf.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libs/tiff/libtiff/tiffconf.h b/libs/tiff/libtiff/tiffconf.h index b5a667c8edf..163599d5091 100644 --- a/libs/tiff/libtiff/tiffconf.h +++ b/libs/tiff/libtiff/tiffconf.h @@ -73,7 +73,7 @@ #define CCITT_SUPPORT 1 /* Support JPEG compression (requires IJG JPEG library) */ -/* #undef JPEG_SUPPORT */ +#define JPEG_SUPPORT /* Support JBIG compression (requires JBIG-KIT library) */ /* #undef JBIG_SUPPORT */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7984
From: Nikolay Sivov <nsivov(a)codeweavers.com> Signed-off-by: Nikolay Sivov <nsivov(a)codeweavers.com> --- dlls/windowscodecs/libtiff.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dlls/windowscodecs/libtiff.c b/dlls/windowscodecs/libtiff.c index 5c84629c871..60c5ffe3404 100644 --- a/dlls/windowscodecs/libtiff.c +++ b/dlls/windowscodecs/libtiff.c @@ -215,6 +215,18 @@ static HRESULT tiff_get_decode_info(TIFF *tiff, tiff_decode_info *decode_info) TRACE("planar %u, photometric %u, samples %u, bps %u\n", planar, photometric, samples, bps); + if (photometric == PHOTOMETRIC_YCBCR) + { + uint16_t compress; + + TIFFGetFieldDefaulted(tiff, TIFFTAG_COMPRESSION, &compress); + if (planar == PLANARCONFIG_CONTIG && compress == COMPRESSION_JPEG) + { + TIFFSetField(tiff, TIFFTAG_JPEGCOLORMODE, JPEGCOLORMODE_RGB); + photometric = PHOTOMETRIC_RGB; + } + } + switch(photometric) { case 0: /* WhiteIsZero */ -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/7984
This merge request was approved by Esme Povirk. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/7984
participants (3)
-
Esme Povirk (@madewokherd) -
Nikolay Sivov -
Nikolay Sivov (@nsivov)