summaryrefslogtreecommitdiff
path: root/base/gsicc.c
diff options
context:
space:
mode:
authorMichael Vrhel <michael.vrhel@artifex.com>2021-06-16 12:15:32 -0700
committerMichael Vrhel <michael.vrhel@artifex.com>2021-06-16 14:43:58 -0700
commita50589042f1462c07f5cc724573684e3e3ab47bb (patch)
tree26a24a6a4619c7f17c70eeb584129a807c9acdee /base/gsicc.c
parent581960fc11688778a5d923073e7c04a240db4718 (diff)
downloadghostpdl-a50589042f1462c07f5cc724573684e3e3ab47bb.tar.gz
Set device colors beyond profile components
If we have a device that has components beyond the ICC components make sure to set them to zero prior to the mapping to concrete values following the ICC mapping.
Diffstat (limited to 'base/gsicc.c')
-rw-r--r--base/gsicc.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/base/gsicc.c b/base/gsicc.c
index ab593946d..2624ce6e3 100644
--- a/base/gsicc.c
+++ b/base/gsicc.c
@@ -427,9 +427,13 @@ gx_remap_ICC_with_link(const gs_client_color * pcc, const gs_color_space * pcs,
the transfer function and potentially the halftoning */
/* Right now we need to go from unsigned short to frac. I really
would like to avoid this sort of stuff. That will come. */
- for ( k = 0; k < num_des_comps; k++){
+ for (k = 0; k < num_des_comps; k++){
conc[k] = ushort2frac(psrc_temp[k]);
}
+ /* In case there are extra components beyond the ICC ones */
+ for (k = num_des_comps; k < dev->color_info.num_components; k++) {
+ conc[k] = 0;
+ }
gx_remap_concrete_ICC(pcs, conc, pdc, pgs, dev, select, dev_profile);
/* Save original color space and color info into dev color */