diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2019-08-31 12:45:47 +0100 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2019-08-31 12:48:46 +0100 |
commit | 5569e2b2057a25ff1fe0b2b5106e71f2b5142f5c (patch) | |
tree | ca43d622d470e73089807df8e198aa5f13b0d520 /base/gsovrc.c | |
parent | 51dbfc90fdc681f4500b498cec52056fb0d2224b (diff) | |
download | ghostpdl-5569e2b2057a25ff1fe0b2b5106e71f2b5142f5c.tar.gz |
Update overprint hl_color code to cope with 16bit devices too.
Diffstat (limited to 'base/gsovrc.c')
-rw-r--r-- | base/gsovrc.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/base/gsovrc.c b/base/gsovrc.c index a7b88c0ca..ad75b5809 100644 --- a/base/gsovrc.c +++ b/base/gsovrc.c @@ -1057,7 +1057,7 @@ overprint_copy_planes(gx_device * dev, const byte * data, int data_x, int raster } /* Currently we really should only be here if the target device is planar - AND it supports devn colors AND is 8 bit. */ + AND it supports devn colors AND is 8 or 16 bit. */ static int overprint_fill_rectangle_hl_color(gx_device *dev, const gs_fixed_rect *rect, const gs_gstate *pgs, @@ -1078,6 +1078,7 @@ overprint_fill_rectangle_hl_color(gx_device *dev, gx_color_index comps = opdev->drawn_comps; gx_color_index mask; int shift; + int deep; if (tdev == 0) return 0; @@ -1094,6 +1095,7 @@ overprint_fill_rectangle_hl_color(gx_device *dev, byte_depth = depth / num_comps; mask = ((gx_color_index)1 << byte_depth) - 1; shift = 16 - byte_depth; + deep = byte_depth == 16; /* allocate a buffer for the returned data */ raster = bitmap_raster(w * byte_depth); @@ -1142,7 +1144,7 @@ overprint_fill_rectangle_hl_color(gx_device *dev, if ((comps & 0x01) == 1) { /* Not sure if a loop or a memset is better here */ memset(gb_params.data[k], - ((pdcolor->colors.devn.values[k]) >> shift & mask), w); + ((pdcolor->colors.devn.values[k]) >> shift & mask), w<<deep); } comps >>= 1; } |