diff options
author | Michael Vrhel <michael.vrhel@artifex.com> | 2021-05-27 22:04:43 -0700 |
---|---|---|
committer | Michael Vrhel <michael.vrhel@artifex.com> | 2021-05-28 12:41:58 -0700 |
commit | a717276b18765b86c6f55749f559d210b63084d4 (patch) | |
tree | 6fb0f1922699f6dca5955d2b15a0f10236c53be5 /base/gxdcolor.c | |
parent | d0c949ed3acfecde5c0b39be8b6e0358192c42a6 (diff) | |
download | ghostpdl-a717276b18765b86c6f55749f559d210b63084d4.tar.gz |
Expand and alter support for NCLR ICC profile and color names
This commit affects the capabilities of the psdcmyk device
and the tiffsep device. Much of the discussion below
is now in the documentation, but is included here for completeness.
Normally with an NCLR ICC profile you can specify the
colorants using
-sICCOutputColors="Cyan, Magenta, Yellow, Black, Orange, Violet"
for example for a 6CLR ICC profile.
Now we allow additional names beyond those of the ICC profile
component count. In this case, those names will be installed
into the tiffsep or psdcmyk device list of colors, following
the ICC profile colors.
The number of spot colors (those that go beyond the standard CMYK colors)
allowed by tiffsep or psdcmyk can be set using -dMaxSpots=#. The default
value for this is currently set to 10 (GS_SOFT_MAX_SPOTS).
As an example consider the case where we wish to use a
6CLR ICC profile that includes Orange and Violet, but
need the device to include a specialty color such as
Varnish, which does not appear in the document and is not
handled by the 6CLR ICC profile. In addition, we desire
to allow one more spot color of the document to come through
to our device. For this case using
-sICCOutputColors="Cyan, Magenta, Yellow, Black, Orange, Violet, Varnish"
-dMaxSpots= 4
-sOutputICCProfile=My_6CLR_Profile.icc
would provide the desired outcome.
Note that it is up to the device or through the use of
-sNamedProfile to involve the setting of any values
in the Varnish channel. However, if an All color value
is encountered in the document, the Varnish component will
have its value set as will the Orange and Violet components
(Likewise if a spot color named Varnish is
encountered in the document the Varnish component will
be used for the values).
Finally this commit adds a debug option --debug=clist-color
which will provide clist writing and reading debug information
for the reading and writing of devn color values to and from
the clist. This is helpful to debug cases where the pdf14 color
model changes due to group color space changes, which can be
difficult to track down when there is a mismatch in the read and
write of the color values.
Thanks to Ray Johnston for his help on much of this effort.
Diffstat (limited to 'base/gxdcolor.c')
-rw-r--r-- | base/gxdcolor.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/base/gxdcolor.c b/base/gxdcolor.c index cead03096..4150d5260 100644 --- a/base/gxdcolor.c +++ b/base/gxdcolor.c @@ -563,14 +563,20 @@ gx_devn_write_color( uchar ncomps = cdev->clist_color_info.num_components; /* Could be different than target if 1.4 device */ gx_color_index mask = 0x1, comp_bits = 0; + if_debug1m(gs_debug_flag_clist_color, dev->memory, + "[clist_color] Writing devn color, %d components [ ", ncomps); + /* First find the number of non zero values */ for (i = 0; i < ncomps; i++, mask <<= 1) { + if_debug1m(gs_debug_flag_clist_color, dev->memory, + "%d ", pdevc->colors.devn.values[i]); if (pdevc->colors.devn.values[i] != 0) { comp_bits |= mask; count++; } } mask = comp_bits; + if_debug0m(gs_debug_flag_clist_color, dev->memory, "]\n"); num_bytes1 = sizeof(gx_color_index); num_bytes = num_bytes1 + count * 2 + 1; /* One for the tag byte */ @@ -706,6 +712,9 @@ gx_devn_read_color( pos++; num_bytes++; + if_debug1m(gs_debug_flag_clist_color, dev->memory, + "[clist_color] Reading devn color, %d components [ ", ncomps); + /* Now the data */ for (i = 0; i < ncomps; i++) { if (mask & 1) { @@ -717,8 +726,11 @@ gx_devn_read_color( } else { values[i] = 0; } + if_debug1m(gs_debug_flag_clist_color, dev->memory, + "%d ", values[i]); mask >>= 1; } + if_debug0m(gs_debug_flag_clist_color, dev->memory, "]\n"); return num_bytes; } |