summaryrefslogtreecommitdiff
path: root/source/cbz/muimg.c
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2017-10-19 11:32:47 -0700
committerRobin Watts <robin.watts@artifex.com>2017-10-25 10:58:36 +0100
commite690d03c3f74899473a315de670a019c98d2841d (patch)
treed03dbc6d72ba32d761039b0a96b40d4f97ff53ad /source/cbz/muimg.c
parentba492ede82d91cae0b7531b37e1ae10b96152f26 (diff)
downloadmupdf-e690d03c3f74899473a315de670a019c98d2841d.tar.xz
Have get_output_intent return ICC profile for image class document
This is needed for gsview where I would like to know the output intent of the PDF document as well as the color space for any image documents that we open. That way users can better know how best to color manage the documents.
Diffstat (limited to 'source/cbz/muimg.c')
-rw-r--r--source/cbz/muimg.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/source/cbz/muimg.c b/source/cbz/muimg.c
index 147dbe12..ef483c18 100644
--- a/source/cbz/muimg.c
+++ b/source/cbz/muimg.c
@@ -95,6 +95,13 @@ img_lookup_metadata(fz_context *ctx, fz_document *doc_, const char *key, char *b
return -1;
}
+static fz_colorspace*
+img_get_colorspace(fz_context *ctx, fz_document *doc_)
+{
+ img_document *doc = (img_document*)doc_;
+ return doc->image->colorspace;
+}
+
static img_document *
img_new_document(fz_context *ctx, fz_image *image)
{
@@ -104,6 +111,7 @@ img_new_document(fz_context *ctx, fz_image *image)
doc->super.count_pages = img_count_pages;
doc->super.load_page = img_load_page;
doc->super.lookup_metadata = img_lookup_metadata;
+ doc->super.get_output_intent = img_get_colorspace;
doc->image = fz_keep_image(ctx, image);