summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/colorspace.c10
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)
{