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:49:30 +0100 |
commit | d80a7eacb629029828ccb79b8bee03a0b471b8c1 (patch) | |
tree | c9d16c948c4e6edf6bd56da2158b785f523dee7d | |
parent | 1199113e458fd63702a270783124dd9832732d84 (diff) | |
download | ghostpdl-d80a7eacb629029828ccb79b8bee03a0b471b8c1.tar.gz |
Update overprint hl_color code to cope with 16bit devices too.
-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; } |