From 82b600dac5eb34b0c156302581303be834d655ce Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 24 May 2016 19:55:42 +0100 Subject: Cope better when asked to plot alpha only pixmaps. Converting a pixmap to an alpha only pixmap means "just keep the alpha". If there IS no alpha, then a solid alpha is assumed. --- source/fitz/colorspace.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'source/fitz/colorspace.c') diff --git a/source/fitz/colorspace.c b/source/fitz/colorspace.c index 7923446a..298c4712 100644 --- a/source/fitz/colorspace.c +++ b/source/fitz/colorspace.c @@ -1633,9 +1633,12 @@ fz_convert_pixmap(fz_context *ctx, fz_pixmap *dp, fz_pixmap *sp) fz_colorspace *ss = sp->colorspace; fz_colorspace *ds = dp->colorspace; - if (ds == NULL && sp->alpha) + if (ds == NULL) { - fast_copy_alpha(dp, sp); + if (sp->alpha) + fast_copy_alpha(dp, sp); + else + fz_clear_pixmap_with_value(ctx, dp, 255); return; } -- cgit v1.2.3