summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/colorspace.h
diff options
context:
space:
mode:
authorTor Andersson <tor.andersson@artifex.com>2016-12-21 16:19:28 +0100
committerTor Andersson <tor.andersson@artifex.com>2016-12-27 15:06:51 +0100
commit9423400441f32a4c28651ee255cb95cecf49a57a (patch)
tree1cea74f63248ca990e92ca73ef52a87d04aed769 /include/mupdf/fitz/colorspace.h
parentbc0b5d4b39e3050c36162d719666053e520161c9 (diff)
downloadmupdf-9423400441f32a4c28651ee255cb95cecf49a57a.tar.xz
Common code to ensure we only premultiply pixmaps with additive colors.
Diffstat (limited to 'include/mupdf/fitz/colorspace.h')
-rw-r--r--include/mupdf/fitz/colorspace.h9
1 files changed, 8 insertions, 1 deletions
diff --git a/include/mupdf/fitz/colorspace.h b/include/mupdf/fitz/colorspace.h
index 398503d1..8a1c5caf 100644
--- a/include/mupdf/fitz/colorspace.h
+++ b/include/mupdf/fitz/colorspace.h
@@ -29,6 +29,13 @@ int fz_colorspace_is_indexed(fz_context *ctx, fz_colorspace *cs);
int fz_colorspace_is_lab(fz_context *ctx, fz_colorspace *cs);
/*
+ fz_colorspace_is_subtractive: Return true if a colorspace is subtractive.
+
+ True for CMYK, Separation and DeviceN colorspaces.
+*/
+int fz_colorspace_is_subtractive(fz_context *ctx, fz_colorspace *pix);
+
+/*
fz_device_gray: Get colorspace representing device specific gray.
*/
fz_colorspace *fz_device_gray(fz_context *ctx);
@@ -77,7 +84,7 @@ typedef void (fz_colorspace_convert_fn)(fz_context *ctx, fz_colorspace *cs, cons
typedef void (fz_colorspace_destruct_fn)(fz_context *ctx, fz_colorspace *cs);
-fz_colorspace *fz_new_colorspace(fz_context *ctx, char *name, int n, fz_colorspace_convert_fn *to_rgb, fz_colorspace_convert_fn *from_rgb, fz_colorspace_destruct_fn *destruct, void *data, size_t size);
+fz_colorspace *fz_new_colorspace(fz_context *ctx, char *name, int n, int is_subtractive, fz_colorspace_convert_fn *to_rgb, fz_colorspace_convert_fn *from_rgb, fz_colorspace_destruct_fn *destruct, void *data, size_t size);
fz_colorspace *fz_new_indexed_colorspace(fz_context *ctx, fz_colorspace *base, int high, unsigned char *lookup);
fz_colorspace *fz_keep_colorspace(fz_context *ctx, fz_colorspace *colorspace);
void fz_drop_colorspace(fz_context *ctx, fz_colorspace *colorspace);