summaryrefslogtreecommitdiff
path: root/base/gxcmap.c
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2022-09-15 12:56:45 -0700
committerMichael Vrhel <michael.vrhel@artifex.com>2022-09-15 12:57:18 -0700
commitce16458c7f99ccc9d4e7b64d4946cf5082738394 (patch)
tree8b6dde2996ef34f66f91fe4b4890ec4eb8f1fd02 /base/gxcmap.c
parent85277d1dd24c5eebf4579ae22c54fb9b25683c9d (diff)
downloadghostpdl-ce16458c7f99ccc9d4e7b64d4946cf5082738394.tar.gz
Bug 705703 psdcmyktags device
When doing separation or devicen fills, make sure that the tags plane gets set.
Diffstat (limited to 'base/gxcmap.c')
-rw-r--r--base/gxcmap.c21
1 files changed, 21 insertions, 0 deletions
diff --git a/base/gxcmap.c b/base/gxcmap.c
index bdf83cba8..0c7bc7e12 100644
--- a/base/gxcmap.c
+++ b/base/gxcmap.c
@@ -1507,6 +1507,16 @@ cmap_separation_direct(frac all, gx_device_color * pdc, const gs_gstate * pgs,
for (i = 0; i < ncomps; i++)
pdc->colors.devn.values[i] = cv[i];
pdc->type = gx_dc_type_devn;
+
+ /* Let device set the tags if present */
+ if (device_encodes_tags(dev)) {
+ const gx_device *cmdev;
+ const gx_cm_color_map_procs *cmprocs;
+
+ cmprocs = dev_proc(dev, get_color_mapping_procs)(dev, &cmdev);
+ cmprocs->map_cmyk(cmdev, 0, 0, 0, 0, cm_comps);
+ pdc->colors.devn.values[ncomps - 1] = frac2cv(cm_comps[ncomps - 1]);
+ }
return;
}
@@ -1647,6 +1657,17 @@ cmap_devicen_direct(const frac * pcc,
pdc->colors.devn.values[i] = frac2cv(frac_1 - gx_map_color_frac(pgs,
(frac)(frac_1 - cm_comps[i]), effective_transfer[i]));
pdc->type = gx_dc_type_devn;
+
+ /* Let device set the tags if present */
+ if (device_encodes_tags(dev)) {
+ const gx_device *cmdev;
+ const gx_cm_color_map_procs *cmprocs;
+
+ cmprocs = dev_proc(dev, get_color_mapping_procs)(dev, &cmdev);
+ cmprocs->map_cmyk(cmdev, 0, 0, 0, 0, cm_comps);
+ pdc->colors.devn.values[ncomps - 1] = frac2cv(cm_comps[ncomps - 1]);
+ }
+
return;
}