diff options
author | Robin Watts <robin.watts@artifex.com> | 2016-11-07 12:44:11 +0000 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2016-11-07 12:49:56 +0000 |
commit | 7456ccc6c3ec48490dffebaf26f85f9f5529fbe0 (patch) | |
tree | 519892821dc435d5b5f8e8f8555951d596da1d4c /source/pdf | |
parent | ac56cc7292b6f06f763db9cd50bf67684961239d (diff) | |
download | mupdf-7456ccc6c3ec48490dffebaf26f85f9f5529fbe0.tar.xz |
Default background of luminosity masks should be black.
In CMYK groups this is NOT the same as "all components 0".
This improves the rendering of Bug689931a.pdf
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-interpret.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/source/pdf/pdf-interpret.c b/source/pdf/pdf-interpret.c index 28a02f13..58999373 100644 --- a/source/pdf/pdf-interpret.c +++ b/source/pdf/pdf-interpret.c @@ -465,8 +465,14 @@ pdf_process_extgstate(fz_context *ctx, pdf_processor *proc, pdf_csi *csi, pdf_ob fz_drop_colorspace(ctx, colorspace); } + /* Default background color is black. */ for (k = 0; k < colorspace_n; k++) softmask_bc[k] = 0; + /* Which in CMYK means not all zeros! This should really be + * a test for subtractive color spaces, but this will have + * to do for now. */ + if (colorspace == fz_device_cmyk(ctx)) + softmask_bc[3] = 1.0; bc = pdf_dict_get(ctx, obj, PDF_NAME_BC); if (pdf_is_array(ctx, bc)) |