From 37bcf35c71204d29a20a8be08741baf65870ac9c Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 24 May 2016 17:21:13 +0100 Subject: Fix fz_decode_tile in the absence of alpha. When no alpha present, we were omitting to decode the last component. --- source/fitz/draw-unpack.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'source') diff --git a/source/fitz/draw-unpack.c b/source/fitz/draw-unpack.c index 8ac76bdc..ccb3c62f 100644 --- a/source/fitz/draw-unpack.c +++ b/source/fitz/draw-unpack.c @@ -222,7 +222,7 @@ fz_decode_tile(fz_context *ctx, fz_pixmap *pix, const float *decode) unsigned char *p = pix->samples; int stride = pix->stride - pix->w * pix->n; int len; - int n = fz_maxi(1, pix->n - 1); + int n = fz_maxi(1, pix->n - pix->alpha); int needed; int k; int h; -- cgit v1.2.3