diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-03-19 15:19:17 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2012-03-19 15:19:17 +0000 |
commit | d11a38dbd783b746d7a35f03fecfb3cbca65527e (patch) | |
tree | 968ced2794aac77e45b1b1cc2567f2ee4f57f838 /pdf/pdf_image.c | |
parent | 3598f93db06f029ce4851cc0b43bdfa9ec182a2d (diff) | |
download | mupdf-d11a38dbd783b746d7a35f03fecfb3cbca65527e.tar.xz |
Bug 692746; avoid 'double palettes' on jpx images.
It seems that JPX images can be supplied in indexed format, with
both a palette internal to the jpx stream, and a palette in the
PDF. Googling seems to suggest that the internal palette should
be ignored in this case, and the external palette applied.
Fortunately, since OpenJPEG-1.5 there is a flag that can be used
to tell OpenJPEG not to decode palettes. We update the code here
to spot that there is an external palette, and to set this flag.
Diffstat (limited to 'pdf/pdf_image.c')
-rw-r--r-- | pdf/pdf_image.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pdf/pdf_image.c b/pdf/pdf_image.c index 17996a74..dc9cc088 100644 --- a/pdf/pdf_image.c +++ b/pdf/pdf_image.c @@ -504,7 +504,7 @@ pdf_load_jpx(pdf_document *xref, pdf_obj *dict, pdf_image *image) indexed = !strcmp(colorspace->name, "Indexed"); } - img = fz_load_jpx(ctx, buf->data, buf->len, colorspace); + img = fz_load_jpx(ctx, buf->data, buf->len, colorspace, indexed); /* RJW: "cannot load jpx image" */ if (img && colorspace == NULL) |