summaryrefslogtreecommitdiff
path: root/source/pdf
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-08-02 18:17:41 +0100
committerRobin Watts <robin.watts@artifex.com>2017-10-24 15:16:35 +0100
commitcbdb9dc747ff7e7c9e187e056c4077edae629729 (patch)
tree800d473527ee866b91fe9fcdce8ee6930f1c058b /source/pdf
parent3e6e2464b32ca6d9fdc9cfc8c80c33aace8ec5e0 (diff)
downloadmupdf-cbdb9dc747ff7e7c9e187e056c4077edae629729.tar.xz
Don't apply default decode array to ICC Lab image data.
Adjust the decode array to allow for the fact that the default decode is done by the ICC code.
Diffstat (limited to 'source/pdf')
-rw-r--r--source/pdf/pdf-image.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/source/pdf/pdf-image.c b/source/pdf/pdf-image.c
index 48c78d96..b7768074 100644
--- a/source/pdf/pdf-image.c
+++ b/source/pdf/pdf-image.c
@@ -115,6 +115,15 @@ pdf_load_image_imp(fz_context *ctx, pdf_document *doc, pdf_obj *rdb, pdf_obj *di
for (i = 0; i < n * 2; i++)
decode[i] = pdf_to_real(ctx, pdf_array_get(ctx, obj, i));
}
+ else if (fz_colorspace_is_lab(ctx, colorspace) || fz_colorspace_is_lab_icc(ctx, colorspace))
+ {
+ decode[0] = 0;
+ decode[1] = 100;
+ decode[2] = -128;
+ decode[3] = 127;
+ decode[4] = -128;
+ decode[5] = 127;
+ }
else
{
float maxval = indexed ? (1 << bpc) - 1 : 1;