diff options
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-colorspace.c | 8 | ||||
-rw-r--r-- | source/pdf/pdf-interpret.c | 7 |
2 files changed, 15 insertions, 0 deletions
diff --git a/source/pdf/pdf-colorspace.c b/source/pdf/pdf-colorspace.c index 9ade1a71..611a187b 100644 --- a/source/pdf/pdf-colorspace.c +++ b/source/pdf/pdf-colorspace.c @@ -167,6 +167,14 @@ load_separation(pdf_document *doc, pdf_obj *array) return cs; } +int +pdf_is_tint_colorspace(fz_colorspace *cs) +{ + return cs && cs->to_rgb == separation_to_rgb; +} + +/* Indexed */ + static fz_colorspace * load_indexed(pdf_document *doc, pdf_obj *array) { diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c index b498d54d..3790578f 100644 --- a/source/pdf/pdf-interpret.c +++ b/source/pdf/pdf-interpret.c @@ -1252,6 +1252,13 @@ pdf_set_colorspace(pdf_csi *csi, int what, fz_colorspace *colorspace) mat->v[1] = 0; mat->v[2] = 0; mat->v[3] = 1; + + if (pdf_is_tint_colorspace(colorspace)) + { + int i; + for (i = 0; i < colorspace->n; i++) + mat->v[i] = 1.0f; + } } static void |