revfix

## xicc/revfix

### Summary

Regenerate a CLUT device profiles B2A table data by inverting the A2B table.

### Usage Summary

revfix [-options] iccin iccout
-v Verbose
-0 Process perceptual
-1 Process absolute/relative colorimetric
-2 Process saturation
-r res Override BtoA1 CLUT res.
-k [ezhxr] e = same K as existing BtoA table (def)
z = zero, h = 0.5 K, x = max K, r = ramp K
-k p stle stpo enle enpo shape
p = curve parameters
stle: K level at White 0.0 - 1.0
stpo: start point of transition Wh 0.0 - Bk 1.0
enpo: End point of transition Wh 0.0 - Bk 1.0
enle: K level at Black 0.0 - 1.0
shape: 1.0 = straight, 0.0-1.0 concave, 1.0-2.0 convex
-K parameters Same as -k, but target is K locus rather than K value itself
-l tlimit set total ink limit, 0 - 400% (estimate by default)
-L klimit set black ink limit, 0 - 100% (estimate by default)
-p aprof.icm Include abstract profile in output tables

### Usage Details and Discussion

Existing ICC profiles may not contain accurately inverted AtoB table data in their B2A tables, and this tool provides a means of addressing this, or regenerating the B2A information with a different black generation and/or ink limit, or applying an abstract correction profile to the B2A table, without completely recreating the profile.
Currently revfix does not support creating real perceptual or saturation B2A tables, but can only create relative colorimetric tables. It also will not handle CLUT profile that use a matrix element in them.
-v Turn on verbose mode. Gives progress information as the table is created. Since B2A tables can take a long time to generate, this is often useful to monitor progress.
The B2A table to be re-creating can be specified by using the -0, -1, and -2f lags. Normally only the -1 flag should be specified, but the perceptual and saturation tables can be replaces instead/as well, if their respective flags are specified.
Normally the re-created B2A table will have the same CLUT resolution as the existing table, but this can be overridden by using the -r flag. Typically a resolution of 9 might be used for a medium quality CMYK table, with 17 being used for a high quality CMYK table. For an RGB profile, a resolution of 17 might be used for a medium quality table, and 33 being used for a high quality table.
``
-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.
Possible arguments to the -k flag are:
-kz selects minimum black (0.0)
-kh selects a black value of 0.5
-kx selects the maximum possible black (1.0)
-kr selects a linear black ramp, starting at minimum black for highlight, and maximum black for shadow (equivalent to -kp 0 0 1 1 1). This is the default.
-k p stle stpo enpo enle shape allows an arbitrary black value 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.
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 of 0, and the latter corresponding to a locus target 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 ink limit (TAC, Total Area Coverage) for the CMYK separation, as a total percentage from 0% to 400%. By default, this value will be estimated from the profile. 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 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%. By default, this value will be estimated from the profile. 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 ink limit will be in final calibrated device values if the profile includes calibration information.
The -p option allows specifying an abstract profile be applied to all of the output tables. 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.