From 1bcfc08545f4bed3d1197af1756f7465af11cf96 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Fri, 9 Jun 2017 17:21:03 +0100 Subject: Ensure TIFF images have the correct colorspace. CMYK+Alpha get resolved to RGB+Alpha as part of loading. --- source/fitz/load-tiff.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'source') diff --git a/source/fitz/load-tiff.c b/source/fitz/load-tiff.c index 52dd1893..997e8392 100644 --- a/source/fitz/load-tiff.c +++ b/source/fitz/load-tiff.c @@ -1366,7 +1366,10 @@ fz_load_tiff_info_subimage(fz_context *ctx, unsigned char *buf, size_t len, int *hp = tiff.imagelength; *xresp = (tiff.xresolution ? tiff.xresolution : 96); *yresp = (tiff.yresolution ? tiff.yresolution : 96); - *cspacep = tiff.colorspace; + if (tiff.extrasamples /* == 2 */) + *cspacep = fz_device_rgb(ctx); + else + *cspacep = tiff.colorspace; } fz_always(ctx) { -- cgit v1.2.3