diff options
author | Robin Watts <robin.watts@artifex.com> | 2017-09-27 17:43:04 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2017-09-27 18:05:14 +0100 |
commit | 4e6c95da6da0e878a4db394639e470a5ece23808 (patch) | |
tree | c38279473c48cd2cd4e222ebd19ecad882f4c828 /source | |
parent | 0cf2cd4eb8b1ef891a853c0abb9ca8a317638969 (diff) | |
download | mupdf-4e6c95da6da0e878a4db394639e470a5ece23808.tar.xz |
Bug 698593: Fix assert in image painting.
Diffstat (limited to 'source')
-rw-r--r-- | source/fitz/draw-affine.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/fitz/draw-affine.c b/source/fitz/draw-affine.c index 048dd6ba..08a2161c 100644 --- a/source/fitz/draw-affine.c +++ b/source/fitz/draw-affine.c @@ -3476,7 +3476,10 @@ fz_paint_image_imp(fz_pixmap * restrict dst, const fz_irect *scissor, const fz_p * plotted. In this case treat it as a greyscale * input. */ if (img->n == sa && color) + { sa = 0; + sn = 1; + } #if FZ_PLOTTERS_RGB if (dn == 3 && img->n == 1 + sa && !color) @@ -3507,7 +3510,7 @@ fz_paint_image_imp(fz_pixmap * restrict dst, const fz_irect *scissor, const fz_p } else { - assert((!color && sn == dn) || (color && sn == 1)); + assert((!color && sn == dn) || (color && sn + sa == 1)); if (dolerp) { if (color) |