diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-13 00:53:39 +0800 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2017-08-16 20:09:37 +0800 |
commit | 2e9891c20d83d7a5fa09140ce8046a82dd758433 (patch) | |
tree | f0c514e555fecbbb01a985b1401bed8df0cd3121 /source | |
parent | 33564e95a1834b8e58a0f445363808dfb3b625d4 (diff) | |
download | mupdf-2e9891c20d83d7a5fa09140ce8046a82dd758433.tar.xz |
Allow access to an indexed colorspace's color entries.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/colorspace.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index a20f1a56..82c7c230 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -3169,6 +3169,16 @@ fz_new_indexed_colorspace(fz_context *ctx, fz_colorspace *base, int high, unsign return cs; } +unsigned char * +fz_indexed_colorspace_palette(fz_context *ctx, fz_colorspace *cs, int *high) +{ + struct indexed *idx = cs->data; + if (!fz_colorspace_is_indexed(ctx, cs)) + fz_throw(ctx, FZ_ERROR_GENERIC, "colorspace not indexed"); + *high = idx->high; + return idx->lookup; +} + fz_pixmap * fz_expand_indexed_pixmap(fz_context *ctx, const fz_pixmap *src, int alpha) { |