From 731832ba5518018875e8674e0c48ab1bb92d86bc Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Thu, 22 Jun 2017 10:03:10 -0700 Subject: Make sure CMYK ICC color spaces are subtractive --- source/fitz/colorspace.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'source') 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) -- cgit v1.2.3