diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-10-25 17:40:37 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-10-25 18:01:13 +0100 |
commit | 88f009ec79eb9b5d5773d7073523cb0aaaef6303 (patch) | |
tree | 33b11e6ef3c3c4954f965a5b845549eadf5472e5 /source | |
parent | b1d78819518c5b5647f6e0f97327364921614b2b (diff) | |
download | mupdf-88f009ec79eb9b5d5773d7073523cb0aaaef6303.tar.xz |
Fix pgm corruption with spots files.
When converting from a source space to a destination space with
spots for our "overprint" group push, we were hitting problems
in our use of the pixmap converters.
Pixmap converters with copy_spots set can assume that the source
and destination spots are the same - when copy spots is NOT set,
we cannot assume this. This was leading us to have uninitialised
group backgrounds.
I believe we were only seeing this with pgm because of the device
k to cmyk as K only special case.
Also fix an error in the fast_gray_to_cmyk routine that failed to
account for the change from subtractive to additive.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/colorspace.c | 22 |
1 files changed, 11 insertions, 11 deletions
diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index 1955cd10..e940478e 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -881,7 +881,7 @@ static void fast_gray_to_rgb(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -1016,7 +1016,7 @@ static void fast_gray_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, f h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -1113,7 +1113,7 @@ static void fast_gray_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, f d[0] = 0; d[1] = 0; d[2] = 0; - d[3] = s[0]; + d[3] = 255 - s[0]; s += sn; d += dn; if (da) @@ -1156,7 +1156,7 @@ static void fast_rgb_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -1281,7 +1281,7 @@ static void fast_bgr_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -1409,7 +1409,7 @@ static void fast_rgb_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -1569,7 +1569,7 @@ static void fast_bgr_to_cmyk(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -1729,7 +1729,7 @@ static void fast_cmyk_to_gray(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, f h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -2206,7 +2206,7 @@ static void fast_cmyk_to_rgb(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -2364,7 +2364,7 @@ static void fast_cmyk_to_bgr(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) @@ -2508,7 +2508,7 @@ static void fast_rgb_to_bgr(fz_context *ctx, fz_pixmap *dst, fz_pixmap *src, fz_ h = 1; } - if (ss == 0) + if (ss == 0 && ds == 0) { /* Common, no spots case */ if (da) |