<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImageTransferFunction",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@S@vImageTransferFunction"
  },
  "title" : "vImageTransferFunction"
}
-->

# vImageTransferFunction

A transfer function to convert from linear to nonlinear RGB.

```
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:

```swift
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:

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

## Topics

### Initializers

[`init(c0:c1:c2:c3:gamma:cutoff:c4:c5:)`](/documentation/Accelerate/vImageTransferFunction/init(c0:c1:c2:c3:gamma:cutoff:c4:c5:))

Creates a structure that represents a transfer function to convert from linear to nonlinear RGB.

[`init()`](/documentation/Accelerate/vImageTransferFunction/init())

Creates an empty transfer function structure.

### Transfer function properties

[`c0`](/documentation/Accelerate/vImageTransferFunction/c0)

The `c0` in the transfer function.

[`c1`](/documentation/Accelerate/vImageTransferFunction/c1)

The `c1` in the transfer function.

[`c2`](/documentation/Accelerate/vImageTransferFunction/c2)

The `c2` in the transfer function.

[`c3`](/documentation/Accelerate/vImageTransferFunction/c3)

The `c3` in the transfer function.

[`cutoff`](/documentation/Accelerate/vImageTransferFunction/cutoff)

The `cutoff` in the transfer function.

[`gamma`](/documentation/Accelerate/vImageTransferFunction/gamma)

The `gamma` in the transfer function.

[`c4`](/documentation/Accelerate/vImageTransferFunction/c4)

The `c4` in the transfer function.

[`c5`](/documentation/Accelerate/vImageTransferFunction/c5)

The `c5` in the transfer function.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)