Contents

vImageTransferFunction

A transfer function to convert from linear to nonlinear RGB.

Declaration

struct vImageTransferFunction

Overview

The transfer function here is in the style of ITU-R BT.709, and is the inverse operation of what appears in an ICC color profile. For example, the following code defines the transfer function for ITU-R BT.709-5:

var transferFunction = vImageTransferFunction(
    c0: 1.099,
    c1: 1.0,
    c2: 0.0,
    c3: -0.099,
    gamma: 0.45,
    cutoff: 0.018,
    c4: 4.5,
    c5: 0)

The following is the conversion:

if (R >= cutoff) {
    R' = c0 * pow( c1 * R + c2, gamma ) + c3
} 
else {
    R' = c4 * R + c5                             
}

Topics

Initializers

Transfer function properties

See Also

Creating Core Graphics color spaces