diff options
-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; } |