diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-07-03 18:33:48 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-07-19 19:41:23 +0100 |
commit | f957eae764e6dbc74401b66d6a18ba3290fdb982 (patch) | |
tree | 224513a5080adde16386669feb0881aefe75794a /source/fitz/image.c | |
parent | 3d6cf4e4e543ce0d204db71ef8d0b9277219f250 (diff) | |
download | mupdf-f957eae764e6dbc74401b66d6a18ba3290fdb982.tar.xz |
Add spots to fz_pixmaps.
Update separations interface further to cope with whether spots
should be rendered separately, or as composite colors.
Diffstat (limited to 'source/fitz/image.c')
-rw-r--r-- | source/fitz/image.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/source/fitz/image.c b/source/fitz/image.c index 6ac6fb25..89798bf2 100644 --- a/source/fitz/image.c +++ b/source/fitz/image.c @@ -264,8 +264,11 @@ fz_decomp_image_from_stream(fz_context *ctx, fz_stream *stm, fz_compressed_image int alpha = (image->colorspace == NULL); if (image->use_colorkey) alpha = 1; - tile = fz_new_pixmap(ctx, image->colorspace, w, h, alpha); - tile->interpolate = image->interpolate; + tile = fz_new_pixmap(ctx, image->colorspace, w, h, NULL, alpha); + if (image->interpolate & FZ_PIXMAP_FLAG_INTERPOLATE) + tile->flags |= FZ_PIXMAP_FLAG_INTERPOLATE; + else + tile->flags &= ~FZ_PIXMAP_FLAG_INTERPOLATE; stride = (w * image->n * image->bpc + 7) / 8; @@ -1055,13 +1058,13 @@ display_list_image_get_pixmap(fz_context *ctx, fz_image *image_, fz_irect *subar int r = (subarea->x1 * w + image->super.w - 1) / image->super.w; int b = (subarea->y1 * h + image->super.h - 1) / image->super.h; - pix = fz_new_pixmap(ctx, image->super.colorspace, r-l, b-t, 0); + pix = fz_new_pixmap(ctx, image->super.colorspace, r-l, b-t, NULL, 0); pix->x = l; pix->y = t; } else { - pix = fz_new_pixmap(ctx, image->super.colorspace, w, h, 0); + pix = fz_new_pixmap(ctx, image->super.colorspace, w, h, NULL, 0); } /* If we render the display list into pix with the image matrix, we'll get a unit |