diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2017-10-13 08:56:35 -0700 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-10-24 15:16:38 +0100 |
commit | aafab8f3a54cc61998ddb355c5226dd5d471a5cd (patch) | |
tree | 65cad1a1acec4b64de1be427fcaaa61c5efc5109 /source/fitz | |
parent | e93d7226f386297fc3f7bd5c9044a6177792a345 (diff) | |
download | mupdf-aafab8f3a54cc61998ddb355c5226dd5d471a5cd.tar.xz |
Add interface for setting icc space to bgr format
This is needed so that we can have bgr formatting with
something other than the default sRGB
Diffstat (limited to 'source/fitz')
-rw-r--r-- | source/fitz/colorspace.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index 41d96af6..b168b014 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -3646,6 +3646,18 @@ int fz_colorspace_is_lab_icc(fz_context *ctx, const fz_colorspace *cs) return cs && cs->clamp == clamp_lab_icc; } +void fz_set_icc_bgr(fz_context *ctx, fz_colorspace *cs) +{ + fz_iccprofile *profile; + + if (cs == NULL || !fz_colorspace_is_icc(ctx, cs)) + return; + + profile = cs->data; + profile->bgr = 1; + return; +} + fz_colorspace * fz_new_icc_colorspace(fz_context *ctx, const char *name, int num, fz_buffer *buf) { |