diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2017-06-22 10:03:10 -0700 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-07-17 19:32:06 +0100 |
commit | 731832ba5518018875e8674e0c48ab1bb92d86bc (patch) | |
tree | 50c0471038649a3561a43cbed232e66878e5f104 | |
parent | ef43aa8826d3f1bcbb5ad79018c3648a9c41bd2a (diff) | |
download | mupdf-731832ba5518018875e8674e0c48ab1bb92d86bc.tar.xz |
Make sure CMYK ICC color spaces are subtractive
-rw-r--r-- | source/fitz/colorspace.c | 4 |
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) |