summaryrefslogtreecommitdiff
path: root/source/fitz/draw-device.c
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2016-05-24 19:55:42 +0100
committerRobin Watts <robin.watts@artifex.com>2016-05-26 10:36:35 +0100
commit82b600dac5eb34b0c156302581303be834d655ce (patch)
tree148a78649363b3c6add02ce1e0f057fab3cdbf57 /source/fitz/draw-device.c
parentee972fbfa1093fe2e8641dc450e1c20347df2b04 (diff)
downloadmupdf-82b600dac5eb34b0c156302581303be834d655ce.tar.xz
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.
Diffstat (limited to 'source/fitz/draw-device.c')
-rw-r--r--source/fitz/draw-device.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/source/fitz/draw-device.c b/source/fitz/draw-device.c
index 516e05bc..88e117c7 100644
--- a/source/fitz/draw-device.c
+++ b/source/fitz/draw-device.c
@@ -1227,7 +1227,7 @@ fz_draw_fill_image(fz_context *ctx, fz_device *devp, fz_image *image, const fz_m
{
fz_irect bbox;
fz_pixmap_bbox(ctx, pixmap, &bbox);
- converted = fz_new_pixmap_with_bbox(ctx, model, &bbox, pixmap->alpha);
+ converted = fz_new_pixmap_with_bbox(ctx, model, &bbox, (model ? pixmap->alpha : 1));
fz_convert_pixmap(ctx, converted, pixmap);
pixmap = converted;
}