diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2021-06-14 16:45:57 -0700 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2021-06-16 14:43:57 -0700 |
commit | 13715e71732d53ea959684195e5283f7c07e6afc (patch) | |
tree | d87455d5321841f80e0e57f22a9382410226a237 | |
parent | a66f213444c5c68311a76a254b51058d0e1991a1 (diff) | |
download | ghostpdl-13715e71732d53ea959684195e5283f7c07e6afc.tar.gz |
Fix to ensure extra colorants are cleared
There may be extra colorants in the device that are not
in the control of the ICC profile. Be sure to zero
those colorants.
-rw-r--r-- | base/gsicc.c | 7 | ||||
-rw-r--r-- | base/gxcmap.c | 2 |
2 files changed, 7 insertions, 2 deletions
diff --git a/base/gsicc.c b/base/gsicc.c index 363967b22..ab593946d 100644 --- a/base/gsicc.c +++ b/base/gsicc.c @@ -599,9 +599,14 @@ gx_concretize_ICC( (icc_link->procs.map_color)(dev, icc_link, psrc, psrc_temp, 2); } /* This needs to be optimized */ - for (k = 0; k < num_des_comps; k++){ + for (k = 0; k < num_des_comps; k++) { pconc[k] = float2frac(((float) psrc_temp[k])/65535.0); } + /* We have to worry about extra colorants in the device. */ + for (k = num_des_comps; k < dev->color_info.num_components; k++) { + pconc[k] = 0; + } + /* Release the link */ gsicc_release_link(icc_link); return 0; diff --git a/base/gxcmap.c b/base/gxcmap.c index f31a30503..fd3f0f293 100644 --- a/base/gxcmap.c +++ b/base/gxcmap.c @@ -1693,7 +1693,7 @@ cmap_devicen_direct(const frac * pcc, /* map to the color model */ if (dev_profile->spotnames != NULL && dev_profile->spotnames->equiv_cmyk_set) { map_components_to_colorants(pcc, dev_profile->spotnames->color_map, - cm_comps, pgs->color_component_map.num_colorants); + cm_comps, ncomps); } else { map_components_to_colorants(pcc, &(pgs->color_component_map), cm_comps, pgs->color_component_map.num_colorants); |