From f957eae764e6dbc74401b66d6a18ba3290fdb982 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Mon, 3 Jul 2017 18:33:48 +0100 Subject: Add spots to fz_pixmaps. Update separations interface further to cope with whether spots should be rendered separately, or as composite colors. --- source/fitz/colorspace.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) (limited to 'source/fitz/colorspace.c') diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index d9136086..61988f17 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -2088,7 +2088,7 @@ icc_base_conv_pixmap(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_colorsp int stride_base; int bn; - base = fz_new_pixmap_with_bbox(ctx, base_cs, fz_pixmap_bbox(ctx, src, &bbox), src->alpha); + base = fz_new_pixmap_with_bbox(ctx, base_cs, fz_pixmap_bbox(ctx, src, &bbox), src->seps, src->alpha); bn = base->n; stride_base = base->stride - base->w * bn; @@ -2806,7 +2806,7 @@ fz_expand_indexed_pixmap(fz_context *ctx, const fz_pixmap *src, int alpha) lookup = idx->lookup; n = idx->base->n; - dst = fz_new_pixmap_with_bbox(ctx, idx->base, fz_pixmap_bbox(ctx, src, &bbox), alpha); + dst = fz_new_pixmap_with_bbox(ctx, idx->base, fz_pixmap_bbox(ctx, src, &bbox), src->seps, alpha); s = src->samples; d = dst->samples; s_line_inc = src->stride - src->w * src->n; @@ -2846,7 +2846,10 @@ fz_expand_indexed_pixmap(fz_context *ctx, const fz_pixmap *src, int alpha) } } - dst->interpolate = src->interpolate; + if (src->flags & FZ_PIXMAP_FLAG_INTERPOLATE) + dst->flags |= FZ_PIXMAP_FLAG_INTERPOLATE; + else + dst->flags &= ~FZ_PIXMAP_FLAG_INTERPOLATE; return dst; } -- cgit v1.2.3