summaryrefslogtreecommitdiff
path: root/base/gxclimag.c
diff options
context:
space:
mode:
authorRay Johnston <ray.johnston@artifex.com>2020-02-14 14:02:24 -0800
committerRay Johnston <ray.johnston@artifex.com>2020-02-18 19:31:24 -0800
commitf1b16fe2d0c6f23923fd26d03544030bc285365a (patch)
tree734f6dc9a13a8536d93d089a56accf98696973d7 /base/gxclimag.c
parent646007af056447fefd61eabfcdae85bfd6017d24 (diff)
downloadghostpdl-f1b16fe2d0c6f23923fd26d03544030bc285365a.tar.gz
Fix bug 702079: SEGV with clist and PCL caused by wrong color in images.
The clist_image_plane_data function was called with the dev_color for a band being type <pattern> when the image had type <pure>, but the code was not calling cmd_put_drawing_color to update the bands for the image because uses_color was false. Add rop3_uses_S(pgs0>log_op) as well as (||) rop3_uses_T(pgs->log_op) when CombineWitColor is true. Note that extra calls to cmd_put_drawing_color before an image are low cost and do nothing if the current device color is already the same.
Diffstat (limited to 'base/gxclimag.c')
-rw-r--r--base/gxclimag.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/base/gxclimag.c b/base/gxclimag.c
index 26187f9a2..83f0ccefa 100644
--- a/base/gxclimag.c
+++ b/base/gxclimag.c
@@ -537,7 +537,8 @@ clist_begin_typed_image(gx_device * dev, const gs_gstate * pgs,
indexed = false;
num_components = gs_color_space_num_components(pcs);
}
- uses_color = pim->CombineWithColor && rop3_uses_T(pgs->log_op);
+ uses_color = pim->CombineWithColor &&
+ (rop3_uses_T(pgs->log_op) || rop3_uses_S(pgs->log_op));
}
code = gx_image_enum_common_init((gx_image_enum_common_t *) pie,
(const gs_data_image_t *) pim,