link/icclink
Summary
Link two ICC device profiles to create an ICC device link profile.
icclink takes two device ICC profiles, and links them together,
either in a simple fashion using the standard ICC forward and reverse
tables of the specified intent, or using color appearance space and
true gamut mapping, together with possibly inverting the forward
profile, to allow black ink regeneration or to retain the input
black characteristic from the input profile.
Usage Summary
icclink [-options] inprofile outprofile linkedprofile
-v
Verbose
-V
Verify existing profile, rather than link (Debug
option)
-q [lmhu] Quality -
Low, Medium (def), High, Ultra
-r res
Override clut res. set by -q
-n
Don't preserve device curves in result
-f
Special :- Force neutral colors to be K only output.
-F
Special :- Force all colors to be K only output.
-p aprof.icm Include abstract
profile in link
-s
Simple Mode (default)
-g [src.gam] Gamut Mapping Mode
[optional source image gamut]
-G [src.gam] Gamut Mapping Mode using
inverse outprofile A2B [optional source gamut]
Simple Mode Options:
-i in_intent
p = perceptual, r = relative colorimetric,
s = saturation, a = absolute colorimetric
-o out_intent
p = perceptual, r = relative colorimetric,
s = saturation, a = absolute colorimetric
Mapping Mode Options:
-i intent set
linking intent from the following choice:
0: Absolute Colorimetric (in Jab) [ICC
Absolute Colorimetric]
1: Absolute Appearance
2: White Point Matched Appearance [ICC
Relative Colorimetric]
3: Luminance matched Appearance
4: Perceptual (Preferred) [ICC Perceptual]
5: Saturation
6: Enhanced Saturation [ICC
Saturation]
7: Absolute Colorimetric (Lab)
(Can also use -ia, -ir, -ip or -is as aliases.)
-w [J,a,b]
Use forced whitepoint hack [optional color to map the white to]
-c viewcond set input
viewing conditions for CIECAM02,
either an enumerated choice, or a parameter
-d viewcond set output
viewing conditions for CIECAM02,
either an enumerated choice, or a parameter
Enumerated Viewing Conditions:
0: Practical Reflection Print
1: Print evaluation environment
2: Monitor in typical work environment
3: Monitor in darkened work environment
4: Projector in dim environment
5: Projector in dark environment
6: Original scene - Outdoors
7: Photo CD - original scene
8: Transparencies on a viewing box
s:surround a =
average, m = dim, d = dark,
c = transparency (default average)
w:X:Y:Z Adapted white point
as XYZ (default media white)
w:x:y
Adapted white point as x, y
a:adaptation Adaptatation luminance in
cd.m^2
(default 50.0)
b:background
Background % of image luminance (default 20)
f:flare Flare
light % of image luminance (default 1)
f:X:Y:Z Flare color
as XYZ (default media white)
f:x:y
Flare color as x, y
Inverse outprofile A2B Options:
-k [tzhxr] CMYK Black
generation
t = transfer K from input to output
z = zero K, h = 0.5 K (def), x = maximum
K, r = ramp K
-k p stle stpo enpo enle shape
p = black locus generation curve parameters
-k q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2
enpo2 enle2 shape2
q = transfer input K to dual curve limits
-l tlimit
set total ink limit, 0 - 400% (default none)
-L klimit
set
total ink limit, 0 - 100% (default none)
Usage Details and Discussion
-v Turns on verbose mode. Gives progress
information as the profile is created. Since gamut map mode inverse
profile linking can take a long time to perform, this is often useful.
-V Verifies an existing profile. This is really
a debugging option. It is only useful if all the linking parameters are
identical
to those used during the creation of the profile being verified.
-q [lmhu] Quality -
Low, Medium
(def), High, Ultra
-r res
Override clut res. set by -q
This sets the basic quality of the resulting link, by choosing the
resolution of various tables in the resulting profile, as well as the
resolution of other temporary tables used in creating the link. The -r
flag allows overriding the resolution set by the -q option, for
the ICC profile CLUT multi-dimensional interpolation table.
Normally the per channel device curves in the input and output profiles
are preserved in the resulting device link profile, but the -n
option disables this. This can be useful if the device linearisation
curves
are inappropriate in nature.
The -f option is a special purpose flag useful
only for 3 component (RGB or CMY) input to CMYK output linking, that
causes the output to be
K only for neutral axis input. Neutral axis input is assumed for R=G=B
or
C=M=Y input values. If the -F flag is used,
then all colors will
be converted to K only output.
The -p option alows specifying an abstract
profile be applied between the input and output profiles. An abstract
profile is a way of specifying a color adjustment in a device
independent way. The abstract profile might have been created using one
of the tweak tools, such as refine.
The basic linking style is chosen by using the -s (default), -g
or -G flags. The three behaviors are:
-s Simple mode. No gamut
mapping is performed, the selected intent AtoB and BtoA tables are
simply concatenated to create the output link, with the gamut mapping
behavior being determined solely by the BtoA table. The -i and -o
options allow selection of the input and output ICC intents. This is
typically how other CMS do ICC linking. Details.
-g Gamut mapping mode. In
this mode, the absolute colorimetric AtoB and BtoA tables are used to
perform the link, and the intermediate linking color space is
(generally) the CIECAM02 Jab appearance space. The input and output
viewing conditions can be selected using the -c and -d
options. A gamut mapping is performed between the two spaces,
using the intent selected by the -i option. There is an
optional argument, which is a source gamut to use
instead of that of the source profile. This is to allow optimizing the
gamut mapping to a source gamut of a particular image, which can
give slightly better results that gamut mapping from the gamut of the
source colorspace. Such a source image gamut can be created using the tiffgamut utility. More details
about gamut mapping mode.
-G Use the gamut mapped, inverse
AtoB table linking method. This is generally the most accurate, smooth
and flexible linking method, but takes the longest to perform. The
gamut mapping mode (-g)
options -i, -c, -d, -k and -l
are effective when this method is selected. There is an optional
argument, which is a source gamut to use instead of that of the source
profile. This is to allow optimizing the gamut mapping to a source
gamut of a particular image, which can give slightly better
results that gamut mapping from the gamut of the source colorspace.
Such a source image gamut can be created using the tiffgamut utility. More details
about the gamut mapping, inverse AtoB mode.
The gamut provided to the -g
or -G flag should be in the
same colorspace that icclink
is using internally to connect the two profiles. For all intents except
the last one (no. 7),
the space should be Jab appearance space, with the viewing
conditions generally being those of the input profile viewing
conditions. The input profile will normally be the one used to create a
source image gamut using tiffgamut.
Simple mode gamut mapping options:
-i in_intent
p = perceptual, r = relative
colorimetric,
s =
saturation, a = absolute colorimetric
-o out_intent
p = perceptual, r = relative colorimetric,
s =
saturation, a = absolute colorimetric
These two options simply select the appropriate ICC table, according to
desired intent. Generally, it is a good idea to use the same intent for
both source and destination. Not all ICC profiles support all four
intents.
Gamut mapping mode options:
-i intent
Select the gamut mapping intent. In gamut mapping mode there is
only a single overall intent. As well as a number selection, the
letters a, r, p
and s can be used as aliases
for the intents absolute colorimetric,
relative colorimetric, perceptual and saturation.
The No.0 (or a) intent, Absolute Colorimetric is
intended to reproduce
colors exactly, irrespective of the white point of the each medium.
This
is done using CIECAM02 Jab appearance colorspace by forcing the source
and
destination to have a common white point (but other aspects of the
individual viewing conditions are active), and colors are mapped
directly from
input to output, clipping any out of gamut colors to the closest match.
This is equivalent to the ICC Absolute
Colorimetric intent.
The No. 1 intent, Absolute Appearance, simply
maps the Jab
colors directly from input to output, clipping any out of gamut colors
to the closest match. This attempts to match the exact appearance of
colors as closely as possible, but may not exactly map the white point
of the source to the destination, depending on how different the
viewing conditions are.
The No. 2 (or r) intent is like Absolute
Appearance mode, but maps the
white point from input to output
precisely, and otherwise maps the Jab colors directly from input to
output, clipping any out of gamut colors to the closest match. This is
equivalent to the ICC Relative
Colorimetric intent.
The No. 3 intent, Luminance matched
appearance, linearly
compresses or expands the the luminance axis to match the input to the
output space, while not otherwise altering the gamut, clipping any out
of gamut colors to the closest match.
The No. 4 (or p) intent, Perceptual, uses "knee"
type compression to
make the input gamut fit within the output gamut. As much as possible,
clipping is avoided, hues and the overall appearance is maintained.
This is equivalent to the ICC Perceptual
intent.
The No. 5 intent, Saturation, uses compression
and expansion to
try and make the input gamut exactly match the output gamut, and also
favors higher saturation over hue or lightness preservation.
The No. 6 (or s) intent, Enhanced Saturation, uses
the same basic
gamut mapping as No. 5, Saturation, but increases saturation slightly
in
highly saturated areas of the gamut. This is equivalent to the ICC Saturation intent.
The No. 7 intent, Absolute Appearance (Lab),
is similar to
intent 0, but L*a*b* colorspace is used rather than CIECAM02 Jab
appearance space. This often leads to poor reproduction of blue and red
hues.
The -w flag forces the white points to be
mapped from source to destination, irrespective of the intent chosen.
This is useful if absolute intent is being used, and the two media
white points should match, but don't quite due to measurement error.
The -w flag can optionally be followed by three numbers, that
specify a color that white should be mapped to. This will be in the
colorspace used during linking (typically Jab space, which
has similar characteristics to L*a*b* space). This options can be
useful in fine tuning paper emulation is absolute
colorimetric mapping mode.
The -c and -d options
allow specification of the viewing conditions for the source and
destination colorspaces respectively. The viewing condition information
is used to map the profile PCS (Profile Connection Space, which us
either XYZ or L*a*b*) color into appearance space (CIECAM02), which
is a better colorspace to do gamut mapping in. The viewing conditions
allow the conversion into appearance space to take account of how color
will be seen under particular viewing conditions.
Viewing conditions can be specified in two basic ways. One is to
select from the list of "pre canned", enumerated viewing conditions,
choosing one that is closest to the conditions that are appropriate for
the media type and situation. Alternatively, the viewing conditions
parameters can be specified in detail individually. If both methods are
used, them the chosen enumerated condition will be used as a base, and
its parameters will
then be individually overridden.
Inverse outprofile A2B Options:
When the -G flag is used, the A2B table is inverted "on the
fly", allowing various additional choices as to what device values are
used
to reproduce a particular color. (If the -G flag is not used,
then
such decisions are encoded in the B2A table in the profile, and cannot
be
altered during linking).
-k flag sets the amount of Under Color Removal,
or black generation level when inverting a CMYK output profile. The
black levels specified by the flag are all in relation to the possible
black values for each color being looked up (the possible black locus),
NOT the absolute amount of black that will be used. For instance, at
the white point, no black will be used in the output, even if the black
generation specifies a maximum (since the maximum amount of black that
can be used to print white is actually zero). Similarly, at the black
point, black may well be used, even if the black generation specifies
zero black (since a certain amount of black is needed to achieve the
desired density of color). Possible arguments to the -k option
are:
-kz selects minimum black (0.0)
-kh selects a black locus value of 0.5
-kx selects the maximum possible black (1.0)
-kr selects a linear locus ramp, starting at minimum black for
highlight, and maximum black for shadow (equivalent to -kp 0 0 1 1 1)
-kt, will preserve the black amount from the input (CMYK)
profile to the output (CMYK) profile as much as possible. This
may
be most useful in creating a CMYK to CMYK conversion between two
different
press conditions, while preserving as much as possible the black
only use for text etc. in anything converted.
-k p stle stpo enpo enle shape allows an
arbitrary black locus ramp to be defined, consisting of a starting
value (stle) for highlights, a breakpoint L value (stpo) where it
starts to transition to the shadow level, an end breakpoint L (enpo)
where it flattens out again, and the finishing black level (enle) for
the shadows. There is also a curve parameter, that modifies the
transition from stle to enle to either be concave (ie. the
transition starts gradually and and finished more abruptly) using
values 0.0-1.0, with 0.0 being most concave, or convex (the transition
starts more abruptly but finishes gradually), using values 1.0-2.0,
with 2.0 being the most convex.
-k q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2
enpo2 enle2 shape2 is a combination of the -kt and -kp
functionality, with the black being preserved in CMYK to CMYK linking,
with the output black constrained to be between the first and second
set of curve parameters.
Typical black locus generation curve with parameters something
like: -kp .1 .3 .5 .8 1
1.0 K |
enpo
| _______
enle
| /
| /
| /
| /
stle
| ------/
+-------------------
0.0 K
0.0 stpo 1.0
White
Black
For minimum sensitivity of printed output to the lighting spectrum, it
currently seems best to use the maximum possible black, but other black
generation levels (ie. 0.3 to 0.5) may well be preferred if one wants
to
minimize the noisy appearance of black on an inkjet device, or
if the banding behavior or other rendering flaws of the printer is to
be minimized.
A set of values for an inkjet printer might be something like -kp 0.0
0.2 0.7 0.7 1.0
The xicclu utility can be used to plot out
the resulting black level for a given set of parameters, by using the -g flag.
The -l tlimit parameter sets the total
ink limit (TAC, Total Area Coverage) for the CMYK separation, as a
total
percentage from 0% to 400%. The limit value should generally be set
a little below the value used in the test chart generation, to avoid
the
very edges of the gamut. If the test chart ink limit has been chosen to
be a little beyond an acceptable level, then this number should be the
acceptable level. Although limits can be set below 200%, this will
generally
restrict the color gamut noticeably, as fully saturated secondary
colors
will not be reproduced. Values are between 220% and 300% for typical
printing
devices.
The -L klimit parameter sets the black
channel ink limit for the CMYK separation, as a total percentage from
0%
to 100%. For printing press like devices, this can be used to prevent
the
black channel screening pattern "filling in". Typical values might be
from
95% to 99%.
The inprofile argument specifies the
input profile.
This is the color space/device we are attempting to emulate in the
overall conversion.
The outprofile argument specifies the
output profile.
This is the device we are actually displaying on or printing to.
The linkedprofile argument specifies
the device link
profile. This profile will contain the color transform from the input
space to output space.
For information on typical usage, see the Typical
Usage Scenarios page.