summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2017-06-22 10:03:10 -0700
committerRobin Watts <robin.watts@artifex.com>2017-07-17 19:32:06 +0100
commit731832ba5518018875e8674e0c48ab1bb92d86bc (patch)
tree50c0471038649a3561a43cbed232e66878e5f104 /source
parentef43aa8826d3f1bcbb5ad79018c3648a9c41bd2a (diff)
downloadmupdf-731832ba5518018875e8674e0c48ab1bb92d86bc.tar.xz
Make sure CMYK ICC color spaces are subtractive
Diffstat (limited to 'source')
-rw-r--r--source/fitz/colorspace.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c
index f4002d34..229cd4ca 100644
--- a/source/fitz/colorspace.c
+++ b/source/fitz/colorspace.c
@@ -3013,6 +3013,10 @@ fz_new_icc_colorspace(fz_context *ctx, int num, fz_buffer *buf, const char *name
fz_keep_buffer(ctx, buf);
fz_md5_icc(ctx, profile);
cs = fz_new_colorspace(ctx, "icc", num, 0, NULL, NULL, NULL, is_lab ? clamp_lab_icc : clamp_default_icc, free_icc, profile, sizeof(profile));
+
+ /* This is a bit of a handwave, but should be safe for our cases */
+ if (profile->num_devcomp == 4)
+ cs->is_subtractive = 1;
}
}
fz_catch(ctx)