diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2020-11-20 15:34:54 +0000 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2020-11-20 15:38:26 +0000 |
commit | e2e50a951f3f06c48d908ea8f095e2d7ae2ee5e9 (patch) | |
tree | 75ae8f085101a2cea7a51ae873d352656b7ccbaf /base/gxiscale.c | |
parent | 86ed012049f58ef01d02c18b8f16c6f343be30db (diff) | |
download | ghostpdl-e2e50a951f3f06c48d908ea8f095e2d7ae2ee5e9.tar.gz |
Bug 703161: Fix unknown error when interpolating transparent imagemasks.
Patch from Alex Cherepanov.
Add a dev_spec_op to check for whether copy_alpha is disabled or not.
Clist devices with transparency disable it. Use this to bolster the
decision made in mask_suitable_for_interpolation.
Diffstat (limited to 'base/gxiscale.c')
-rw-r--r-- | base/gxiscale.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/base/gxiscale.c b/base/gxiscale.c index df0255d74..f175fd22a 100644 --- a/base/gxiscale.c +++ b/base/gxiscale.c @@ -145,10 +145,13 @@ static int mask_suitable_for_interpolation(gx_image_enum *penum) int code; int high_level_color = 1; - if (gx_device_must_halftone(penum->dev)) { + if (gx_device_must_halftone(penum->dev)) /* We don't interpolate when going to 1bpp outputs */ return -1; - } else if (gx_dc_is_pure(pdc1) && (pdc1)->colors.pure != gx_no_color_index && + if (dev_proc(penum->dev, dev_spec_op)(penum->dev, gxdso_copy_alpha_disabled, NULL, 0) == 1) + /* The target device has copy_alpha() disabled. */ + return -1; + if (gx_dc_is_pure(pdc1) && (pdc1)->colors.pure != gx_no_color_index && dev_proc(penum->dev, copy_alpha) != NULL && dev_proc(penum->dev, copy_alpha) != gx_no_copy_alpha) { /* We have a 'pure' color, and a valid copy_alpha. We can work with that. */ |