From 2a15410f58b389c5ea19965722e1c4f07202c3b5 Mon Sep 17 00:00:00 2001 From: Michael Vrhel Date: Wed, 22 Nov 2017 23:03:07 -0800 Subject: Allow RGB based proofing profile and output intent Also do not do the extra group push if the destination pixmap is in the proper color space and has all the required sep support. --- source/fitz/draw-device.c | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'source') diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c index 706ff33a..55c9e408 100644 --- a/source/fitz/draw-device.c +++ b/source/fitz/draw-device.c @@ -570,21 +570,21 @@ push_group_for_separations(fz_context *ctx, fz_draw_device *dev, const fz_color_ fz_colorspace *dcs = fz_device_cmyk(ctx); /* Pick sep target CMYK based upon proof and output intent settings. Priority - * is oi, proof, devicecmyk. */ - /* FIXME: Look into non-CMYK proofing profiles */ - if (dev->proof_cs && fz_colorspace_n(ctx, dev->proof_cs) == 4) + * is oi, proof, devicecmyk. */ + if (dev->proof_cs) { dcs = dev->proof_cs; } - /* FIXME : We need to create a file with an RGB output intent at some point and test a few things */ - if (oi && fz_colorspace_n(ctx, oi) == 4) + + if (oi) { dcs = oi; } - /* Not needed */ - if (clone == NULL && dev->proof_cs == NULL && fz_colorspace_n(ctx, dev->stack[0].dest->colorspace) == 4) + /* Not needed if dest has the seps, and we are not using a proof or the target is the same as the prooof and we don't have an oi or the target is the same as the oi */ + if ((clone == dev->stack[0].dest->seps) && (dev->proof_cs == NULL || dev->proof_cs == dev->stack[0].dest->colorspace) && (oi == NULL || oi == dev->stack[0].dest->colorspace)) { + fz_drop_separations(ctx, clone); dev->resolve_spots = 0; return &dev->stack[0]; } -- cgit v1.2.3