## link/collink

### Summary

Link two ICC device profiles to create an ICC device link profile.
collink 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 source black characteristic from the source profile.

### Usage Summary

collink [-options] srcprofile dstprofile linkedprofile
-v Verbose
-A "manufacturer" Set the manufacturer description string
-M "model" Set the model description string
-D "description" Set the profile Description string (Default "inoutfile")
-C "copyright" Set the copyright string
-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.
-fk Special :- Force K only neutral colors to be K only output
-fcmy Special :- Force 100% C,M or Y only to stay pure
-F Special :- Force all colors to be K only output.
-p aprof.icm Include abstract profile in link
-a file.cal Apply calibration curves to link output and append linear
-H file.cal Append calibration curves to 3dlut
-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:
a - Absolute Colorimetric (in Jab) [ICC Absolute Colorimetric]
aw - Absolute Colorimetric (in Jab) with scaling to fit white point
aa - Absolute Appearance
r - White Point Matched Appearance [ICC Relative Colorimetric]
la - Luminance matched Appearance
p - Perceptual (Preferred) [ICC Perceptual]
pa - Perceptual Appearance
ms - Saturation
s - Enhanced Saturation [ICC Saturation]
al - Absolute Colorimetric (Lab)
rl - White Point Matched Colorimetric (Lab)
-w [J,a,b] Use forced whitepoint hack [optional color to map the white to]
-b Use RGB->RGB forced black point hack
-c viewcond set source viewing conditions for CIECAM02,
either an enumerated choice, or a parameter
-d viewcond set destination viewing conditions for CIECAM02,
either an enumerated choice, or a parameter:value change
pp - Practical Reflection Print (ISO-3664 P2)
pe - Print evaluation environment (CIE 116-1995)
pc - Critical print evaluation environment (ISO-3664 P1)
mt - Monitor in typical work environment
mb - Monitor in bright work environment
md - Monitor in darkened work environment
jm - Projector in dim environment
jd - Projector in dark environment
pcd - Photo CD - original scene outdoors
ob - Original scene - Bright Outdoors
cx - Cut Sheet Transparencies on a viewing box
s:surround n = auto, 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)
l:imagewhite Image white in cd.m^2 if surround = auto (default 250)
f:flare Flare light % of image luminance (default 0)
g:glare Glare light % of ambient (default 1)
g:X:Y:Z Glare color as XYZ (default media white)
g:x:y Glare color as x, y
-t tlimit set source total ink limit, 0 - 400% (estimate by default)
-T klimit set source total ink limit, 0 - 100% (estimate by default)
Inverse outprofile A2B Options:
-k tezhxr CMYK Black generation
t = transfer K from source to destination, e = retain K of destination B2A table
z = zero K, h = 0.5 K, x = maximum K, r = ramp K (default)
-k p stle stpo enpo enle shape
p = black level generation curve parameters
-k q stle0 stpo0 enpo0 enle0 shape0 stle2 stpo2 enpo2 enle2 shape2
q = transfer source K to dual curve limits
-K parameters Same as -k, but target is K locus rather than K value itself
-l tlimit set destination total ink limit, 0 - 400% (estimate by default)
-L klimit set destination total ink limit, 0 - 100% (estimate by default)
-3 flag Create "3DLut" output file as well as devlink
e eeColor .txt file
`m MadVR .3dlut file`
`-I B Use BT.1886 source EOTF with technical gamma 2.4``
` `-I b:g.g Use BT.1886-like source EOTF with effective gamma g.g``
` `-I b:p.p:g.g Use effective gamma g.g source EOTF with p.p prop. output black point offset`
`-I g:g.g Use effective gamma g.g source EOTF with all output black point offset`
-e flag Video encode input as:
-E flag Video encode output as:
n normal RGB 0..1 levels (default)
t RGB (16-235)/255 "TV" levels
T RGB (16-235)/255 "TV" levels, clip WTW [Input Only]
6 Rec601 YCbCr SD (16-235,240)/255 "TV" levels
7 Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels
5 Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels
2 Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels
C Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" levels
x xvYCC Rec601 YCbCr Rec709 Prims. SD (16-235,240)/255 "TV" levels
X xvYCC Rec709 YCbCr Rec709 Prims. HD (16-235,240)/255 "TV" levels
-P Create gamut gammap_p.x3d.html and gammap_s.x3d.html diagostics
srcprofile source ICC profile. A TIFF or JPEG file with embedded profile may be used here.
dstprofile destination ICC profile. A TIFF or JPEG file with embedded profile may be used here.
linkedprofile resulting device link profile

### 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.
The -A parameter allows setting of the device manufacturer description tag. This parameter may not be relevant for a link profile, but if used should be a string that identifies the manufacturer of the primary device used in the link. With most command line shells, it will be necessary to enclose the parameter with double quotes, so that spaces and other special characters are included in the parameter, and not mistaken for the start of another flag, or as a final command line parameters. By default no manufacturer description string tag will be generated for the profile.
The -M parameter allows setting of the device mode description tag. This parameter may not be relevant for a link profile, but if used should be a string that identifies the particular model of primary device used in the link. With most command line shells, it will be necessary to enclose the parameter with double quotes, so that spaces and other special characters are included in the parameter, and not mistaken for the start of another flag, or as a final command line parameters. By default no model description string tag will be generated for the profile.
The -D parameter allows setting of the profile description tag. The parameter should be a string that describes the profile. On many systems, it will be this string that will be used to identify the profile from a list of possible profiles. With most command line shells, it will be necessary to enclose the parameter with double quotes, so that spaces and other special characters are included in the parameter, and not mistaken for the start of another flag, or as a final command line parameter. Many programs that deal with ICC profiles use the description tag to identify a profile, rather than the profile filename, so using a descriptive string is important in being able to find a profile. By default, the base name of the resulting profile will be used as the description.
The -C parameter allows setting of the profile copyright tag. The parameter should be a string that describes the copyright (if any) claimed on the profile being generated.. With most command line shells, it will be necessary to enclose the parameter with double quotes, so that spaces and other special characters are included in the parameter, and not mistaken for the start of another flag, or as a final command line parameters. By default a generic copyright string will be generated for the profile.
-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. It is highly recommended that -qm be used as a starting point, and other settings only tried after this has been evaluated. -qu should almost never be used, except to prove that it should almost never be used.
Normally the per channel device curves in the source and destination 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 or 4 component (RGB, CMY or CMYK) source to CMYK destination linking, that causes the destination to be K only for neutral axis input. Neutral axis input is assumed for R=G=B or C=M=Y input values. So as to get a smooth mapping from the source to the K only destination, by default the gamut mapping will be adjusted to target the destination K only black, and Perceptual gamut mapping will be selected along with maximum K inking. If other options are selected that conflict with achieving a smooth mapping, warnings messages will be emitted.
The -F option is a special purpose flag useful only mapping to a CMYK destination, that causes the destination to be converted to K only monochrome. So as to get a smooth mapping from the source to the K only destination, by default the gamut mapping will be adjusted to target the destination K only black, and Perceptual gamut mapping will be selected along with maximum K inking. If other options are selected that conflict with achieving a smooth mapping, warnings messages will be emitted.
The -fk option is a special purpose flag useful only for CMYK source to CMYK destination linking, that causes K only source values to map to K only destination values. This is often useful in re-targeting CMYK material while preserving K only text and graphics. So as to get a smooth mapping from the source to the K only destination, by default the gamut mapping will be adjusted to assume K only black source to destination K only black for K only values, and Perceptual gamut mapping will be selected along with a black generation rule (-kt) that preserves the black level from source to destination. If other options are selected that conflict with achieving a smooth mapping, warnings messages will be emitted.
The -fcmy options are special purpose flags useful only for CMY or CMYK source to CMY or CMYK destination linking. The cmy flags may be used independently or in combination (ie. -fc, -fm, -fy, -fcm, -fcy, -fmy, -fcmy) or combined with the -fk option. These flags ensure that the pure 100% primary colorant source values map to 100% pure colorant destination values, and may be useful in some situations where CMYK material is being re-targeted. Note that forcing the 100% colorant values to map this way largely works against the aims of color management in preserving colors appearance. So as to get a smooth mapping from the source to destination, by default the gamut mapping will a Saturation intent with 100 percept alignment of the selected C, M and/or Y cusp values. A Saturation intent is often what is desired in such CMYK to CMYK re-renderings, as it makes best use of the (usually quite similar sized) destination gamut. If other options are selected that conflict with achieving a smooth mapping, warnings messages will be emitted.
The -p parameter allows specifying an abstract profile be applied between the source and destination 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 -a parameter causes calibration curves in the supplied file to be applied after the link of the profiles. This is used as an alternative to calibration curves being loaded into the graphics card VideoLut. For MadVR 3dlut output, a linear set of calibration curves will also be appended to the 3dlut, ensuring that the correct VideoLUT curves get loaded at the time the 3dLut is used by MadVR v0.86.9 or latter. By default no calibration curves are appended to a MadVR 3dLut.
The -H parameter causes calibration curves in the supplied file to be appended to a MadVR 3dlut output, ensuring that the correct VideoLUT curves get loaded at the time the 3dLut is used by MadVR v0.86.9 or latter. By default no calibration curves are appended to a MadVR 3dLut.
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 source and destination 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 source and destination 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 tool. 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 tool. 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 collink 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 source profile viewing conditions. The source 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. The intent is selected using the 1 two letter option parameter, the standard ICC profile being a subset of the available selections.
The 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 source to destination, clipping any out of gamut colors to the closest match. This is equivalent to the ICC Absolute Colorimetric intent, and is often used for proofing purposes.
The aw intent, Absolute Colorimetric with scaling to fit white point, is very similar to the a intent, except that it will scale the source colorspace down in order to make sure that the source white point isn't clipped by the gamut of the destination. This might be used in some print proofing situations where the source white is lightly lighter than the destination white (as an alternative to using the -w flag), or it may be useful in some soft proofing situations where the differences in white point of the display destination would cause clipping of the source white point. When the -v flag is on, the scaling factor used will be displayed during execution.
The aa intent, Absolute Appearance, simply maps the Jab colors directly from source to destination, 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 r intent is like Absolute Appearance mode, but maps the white point from source to destination precisely, and otherwise maps the Jab colors directly from source to destination, clipping any out of gamut colors to the closest match. This is equivalent to the ICC Relative Colorimetric intent.
The la intent, Luminance matched appearance, linearly compresses or expands the the luminance axis from white to black to match the source to the destination space, while not otherwise altering the gamut, clipping any out of gamut colors to the closest match. This is often useful for appearance based soft proofing.
The p intent, Perceptual, uses "knee" type 3 Dimensional compression to make the source gamut fit within the destination gamut. As much as possible, clipping is avoided, hues and the overall appearance is maintained. The white point is mapped precisely from source to destination.This is equivalent to the ICC Perceptual intent.
The pa intent, Perceptual Appearance uses "knee" type 3 Dimensional compression to make the source gamut fit within the destination gamut. As much as possible, clipping is avoided, hues and the overall appearance is maintained. The white point is not mapped from source to destination, allowing the apperance parameters to alter the chromatic mapping.
The ms intent, Saturation, uses 3 Dimensional compression and expansion to try and make the source gamut exactly match the destination gamut, and also favours higher saturation over hue or lightness preservation. The white point is mapped precisely from source to destination.
The s intent, Enhanced Saturation, uses the same basic gamut mapping as ms, Saturation, but increases saturation slightly in highly saturated areas of the gamut. This is equivalent to the ICC Saturation intent. The white point is mapped precisely from source to destination.
The al intent, Absolute Colorimetric (Lab), is similar to intent a, but L*a*b* colorspace is used rather than CIECAM02 Jab appearance space. This often leads to poor reproduction of blue and red hues, but can be useful as a reference mapping.
The ar intent, White Point Matched Colorimetric (Lab), is similar to intent r, but L*a*b* colorspace is used rather than CIECAM02 Jab appearance space. This often leads to poor reproduction of blue and red hues, but can be useful as a reference mapping.
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 in absolute colorimetric mapping mode.
The -b flag forces RGB source 0,0,0 to map to RGB destination 0,0,0. This may be useful for Video proofing/calibration purposes, where the source is a standard colorspace such as Rec709, and the display device is well behaved with black at 0,0,0. By forcing the black mapping, any slight raising of the black due to display profile tolerances is avoided.
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.
The -t tlimit parameter sets the total ink limit (TAC, Total Area Coverage) for a CMYK source profile, as a total percentage from 0% to 400%. This affects the gamut assumed for the source profile. By default, a total ink limit will be estimated from the source profile B2A table.
The -T klimit parameter sets the black channel ink limit for a CMYK source profile, as a total percentage from 0% to 100%. This affects the gamut assumed for the source profile. By default, a black ink limit will be estimated from the source profile B2A table.
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 parameter sets the target level of black (K) when creating a B2A CMYK output tables. This is often called a black level, a black inking rule, black generation, or under color removal. These set the target black level:
-kz selects minimum black (0.0)
-kh selects a black level value of 0.5
-kx selects the maximum possible black (1.0)
-kr selects a linear level ramp, starting at minimum black for highlight, and maximum black for shadow (equivalent to -kp 0 0 1 1 1). This is the default.
-kt, will preserve the black amount from the source (CMYK) profile to the destination (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. Note that if the source black point is darker than the destination, composite black will still be generated for K only input. The -fk option can be used to avoid this behavior.
-ke, will preserve the black amount from the destination profile B2A table (CMYK).
-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.
Typical black value generation curve with parameters something like: -kp 0 .1 .9 1 .5
`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 behaviour or other rendering flaws of the printer is to be minimized.
Note that the black level curve is applied throughout the gamut, resulting in GCR (Grey Component Replacement). There is no facility to restrict black to just neutral colors, hence UCR is not currently supported.
-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.
The xicclu tool can be used to plot out the resulting black level for a given set of parameters, by using the -g flag of a profile already created from the same .ti3 file.
-K parameters. Any of the -k options above can use the -K version, in which rather than a black value target being defined by the inking rule, a black locus target is defined. For each lookup, the minimum possible black level and the maximum possible black level is determined, the former corresponding to a locus target value of 0, and the latter corresponding to a locus target value of 1. For instance, at the white point, no black will be used in the output, even if the black locus 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 locus specifies zero black (since a certain amount of black is needed to achieve the desired density of color).
``
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%. This affects the gamut assumed for the destination profile, as well as the ink limit in the generated device link. 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. By default, a total ink limit will be estimated from the destination profile B2A table. The ink limit will be in final calibrated device values if the profile includes calibration information.
The -L klimit parameter sets the black channel ink limit for the CMYK separation, as a total percentage from 0% to 100%. This affects the gamut assumed for the source profile, as well as the ink limit in the generated device link. 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%. By default, a black ink limit will be estimated from the source profile B2A table. The ink limit will be in final calibrated device values if the profile includes calibration information.
The -3 flag triggers creation of a "3dLut" of one of the following formats:
e eeColor format ".txt" files. This includes 3 input curve files, the cLut file and 3 output curve files.
m MadVR format ".3dlut" file.
Some hardware devices and other software make use of cLUT type tables that are analogous to ICC device links, but are typically less sophisticated and flexible. The -3 flag allows creation of some of these file formats as well as the normal ICC device link. Choosing one of these formats will typically also configure various other parameters to default values suitable for that format, such as the table resolution (-r), and the use of 1D input and output curves (-n). Other parameters (such as -I, -e and -E) may have to be set to get a table suitable for the particular target and situation.
The -3 e eeColor format is basically a 65^3 cLUT, but the hardware is unable to map a 1.0 input value to anything other than 1.0 output. If one of the video input encodings is being used (-e t or -e 7 etc.), then this is not an issued, since a 1.0 input is not used for image data. For normal (full) input range (ie. if the eeColor is being used to process the output of a computer Video card, and the video card is not encoding using TV values), then this is a problem, and collink will compensate for this by creating a set of per channel input curve files that can be loaded into the eeColor. The xvYCC encoding (-e x and -e X) uses almost the full range of values for the Cb & Cr values, and also needs per channel input curves to allow a full range of mapping.
For this reason collink generates the following 7 files:
basename-first1dred.txt
basename-first1dgreen.txt
basename-first1dblue.txt
test.txt
basename-second1dred.txt
basename-second1dgreen.txt
basename-second1dblue.txt
even though the 1d files will be linear for all cases except the normal and xvYCC input range.
The MadVR format is an 8 bit input, 16 bit output cLUT of 100 Mbytes size, and will written to the file basename.3dlut. If the -a or -H options are used, then the MadVR 3dLut will have a set of appropriate per channel calibration curves appended to the 3dLut, to ensure that the hardware is correctly set for it if used with MadVR V0.86.9 or latter. This functionality is analogous to a 'VCGT' tag in a normal ICC display profile.
There is more information on the Typical Usage Scenarios page.
The -I [b|B|g|G][:p.p][:g.g] series of options, substitutes an alternative EOTF (Electro-Optical Transfer Function) for the one specified by the matrix input profile. This is typically used for creating Video display emulations.
The basic curve is a pure power curve with scaling and a combination of input black offset and/or output black offset. The choice of flag determines the way the power value is interpreted, and the default balance between input and output black offset handling.
The lower case b and g flags use an effective power value specification, where the 50% input maps to the same output value as a pure power curve with a perfect black. These are the recommended flags to use, since this means that the overall contrast of the reproduction will not be affected so much by differences and variations in the black level, or how the black level is accounted for. The default effective power value is 2.2.
The upper case B and G flags use a technical power value specification, where the power value is the actual one that will be used. The end result will vary much more with the black level of the display though. The default technical power value is 2.4.
The b and B flags default to the black level being accounted for as a full input offset, where the power curve is shifted and scaled to match the black point, preserving the black shadow tonality. This is what BT.1886 uses.
The g and G flags default to the black level being accounted for as a full output offset, where the power curve is scaled to allow for the black point, losing some black shadow tonality with higher black points. This is what many people think of as a "pure" power curve, even though this is not possible unless the display has a perfect zero black level.
The optional :g.g value is the power to be used. This will be an effective value if the b or g flags is used, or the technical value if the B or G flag is used. This is the primary way to make an allowance for the brightness of the viewing environment for Video . Darker viewing environments probably need a larger gamma value, while lighter viewing environments probably need a lower value.
The second optional :p.p value is the proportion of black value that should be accounted for as output offset (the gamma value must also be specified after this). This defaults to 0.0 for the b and B flags, and 1.0 for the g and G flags, but by specifying it explicitly as a value between 0.0 and 1.0, a hybrid curve characteristic can be obtained. Setting a hybrid value is a way of maintaining black shadow tonality while being able to control how much detail is retained in those shadows. An appropriate value may depend on exactly how the video material was mastered.
Illustrative combinations are:
-I b Full input offset (BT.1886 like) with effective gamma of 2.2
-I g Full output offset with effective gamma of 2.2
-I B Full input offset (BT.1886 like) with technical gamma of 2.4. This exactly implements the BT.1886 specification.
-I G Full output offset with technical gamma of 2.2
-I b:2.3 Full input offset (BT.1886 like) with effective gamma of 2.3
-I g:2.3 Full output offset with effective gamma of 2.3
-I B:2.35 Full input offset (BT.1886 like) with technical gamma of 2.35
-I G:2.35 Full output offset with technical gamma of 2.35
-I b:0.4:2.3 60% input offset, 40% output offset with effective gamma of 2.3
-I g:0.4:2.3 Same as above.
-I B:0.4:2.35 60% input offset, 40% output offset with technical gamma of 2.35
-I G:0.4:2.35 Same as above.
The -e flag applies a Video encoding to the input. See below and -E for the list of encodings.
T RGB (16-235)/255 "TV" levels, clip WTW [Input Only]
x xvYCC Rec601 YCbCr Rec709 Prims. SD (16-235,240)/255 "TV" levels
X xvYCC Rec709 YCbCr Rec709 Prims. HD (16-235,240)/255 "TV" levels
When xvYCC is chosen, the encoding is either a Rec601 YCbCr or Rec709 YCbCr with extended range Cb and Cr values, and a hard coded Rec709 source colorspace, corresponding to the xvYCC specifications. The source profile provided to collink is used to define the source gamut for gamut mapping, and also the space that any BT.1886 processing will be performed in. For instance, if the xvYCC is being used to encode a larger gamut such as UHD Rec2020, or Digital Cinema SMPTE431 P3, then the corresponding ICC profile should be provided as the source profile.
The -e T option uses the same encoding as -e t, but rather than handling WTW (Whiter Than White, or out of range values) using extrapolation, it clips them to the valid range. This can be useful if you are dealing with source material that has WTW values, but your TV or Video display clips these out of range values in a way that alters the hue.
The -E flag applies a Video encoding to the output. The possible encoding are:
n normal RGB 0..1 full range levels (default)
t RGB (16-235)/255 "TV" levels
6 Rec601 YCbCr SD (16-235,240)/255 "TV" levels
7 Rec709 1125/60Hz YCbCr HD (16-235,240)/255 "TV" levels
5 Rec709 1250/50Hz YCbCr HD (16-235,240)/255 "TV" levels
2 Rec2020 YCbCr UHD (16-235,240)/255 "TV" levels
C Rec2020 Constant Luminance YCbCr UHD (16-235,240)/255 "TV" levels
The T
The -P option causes a diagnostic 3D X3DOM plots to be created that illustrate the gamut mapping generated.
The inprofile argument specifies the source profile. This is the color space/device we are attempting to emulate in the overall conversion. A TIFF or JPEG file with embedded profile may be used here.
The outprofile argument specifies the destination profile. This is the device we are actually displaying on or printing to. A TIFF or JPEG file with embedded profile may be used here.
The linkedprofile argument specifies the resulting device link profile. This profile will contain the color transform from the source space to destination space.
For information on typical usage, see the Typical Usage Scenarios page.