summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-06-09 17:21:03 +0100
committerRobin Watts <Robin.Watts@artifex.com>2017-06-11 11:42:51 +0100
commit1bcfc08545f4bed3d1197af1756f7465af11cf96 (patch)
tree539f48d5b6ce9bf48b5204be7df4545fbce92963 /source/fitz
parentc0e04d9c40be49b7dd7ac0fa4202d50524456144 (diff)
downloadmupdf-1bcfc08545f4bed3d1197af1756f7465af11cf96.tar.xz
Ensure TIFF images have the correct colorspace.
CMYK+Alpha get resolved to RGB+Alpha as part of loading.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/load-tiff.c5
1 files changed, 4 insertions, 1 deletions
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)
{