summaryrefslogtreecommitdiff
path: root/source/pdf/pdf-image.c
diff options
context:
space:
mode:
authorSimon Bünzli <zeniko@gmail.com>2013-08-30 22:09:27 +0200
committerRobin Watts <robin.watts@artifex.com>2013-09-10 14:09:03 +0100
commit6904674fceaa8b289ef70b692ffa2aa7f7afb726 (patch)
treeac376ea8970e8feee8344b1cf1a3c219cf5f5500 /source/pdf/pdf-image.c
parentef983195f1c593f8aa01a484cd2e9b26ce7923ae (diff)
downloadmupdf-6904674fceaa8b289ef70b692ffa2aa7f7afb726.tar.xz
correctly set indexed colors in pdf_set_color
Required for 1879_-_Indexed_colors_wrongly_converted.pdf Also, removing broken code in the same place (where mat->v[] is overwritten right after being set in the L*a*b* case).
Diffstat (limited to 'source/pdf/pdf-image.c')
-rw-r--r--source/pdf/pdf-image.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/source/pdf/pdf-image.c b/source/pdf/pdf-image.c
index 10ae89ff..ef93d96b 100644
--- a/source/pdf/pdf-image.c
+++ b/source/pdf/pdf-image.c
@@ -85,9 +85,7 @@ pdf_load_image_imp(pdf_document *doc, pdf_obj *rdb, pdf_obj *dict, fz_stream *cs
}
colorspace = pdf_load_colorspace(doc, obj);
-
- if (!strcmp(colorspace->name, "Indexed"))
- indexed = 1;
+ indexed = fz_colorspace_is_indexed(colorspace);
n = colorspace->n;
}
@@ -219,7 +217,7 @@ pdf_load_jpx(pdf_document *doc, pdf_obj *dict, int forcemask)
if (obj)
{
colorspace = pdf_load_colorspace(doc, obj);
- indexed = !strcmp(colorspace->name, "Indexed");
+ indexed = fz_colorspace_is_indexed(colorspace);
}
img = fz_load_jpx(ctx, buf->data, buf->len, colorspace, indexed);