Function
Description
Transform linear pixel values using a custom function.
The given function is evaluated on linear pixel values, that is after raw pixels have been translated to normalized pixel values (see Image.Range) and after gamma correction has been applied (see Gamma). The expression may use all members of the default Tinman script. The following arguments are available to the function expression:
-
raw
The input pixel value (raw). -
lin
The input pixel value (linear) in the range [0..1]. -
A, B, C, D, E, F
Coefficients that can be used to transform between raw and linear pixel values:lin = pow(raw * A + B, C) raw = pow(lin, D) * E + F D = 1 / C E = 1 / A F = -B / A
where
rawis the raw pixel value that is actually stored in the source image (e.g. [0..255] for 8-bit images) andlinis the linear pixel value that is stored in the image scanline buffer.AandBrepresent the transformation from raw pixel values to normalized pixel values (see Image.Range);Cis the exponent that best approximates the performed gamma correction (see Gamma).
Fields / Optional
channel
The pixel channel the function shall be applied to. If Channel.Void, no transformation will be performed.