---
title: "applyingGainMap(_:headroom:)"
framework: coreimage
role: symbol
role_heading: Instance Method
path: "coreimage/ciimage/applyinggainmap(_:headroom:)"
---

# applyingGainMap(_:headroom:)

Create an image that applies a gain map Core Image image with a specified headroom to the received Core Image image.

## Declaration

```swift
func applyingGainMap(_ gainmap: CIImage, headroom: Float) -> CIImage
```

## Parameters

- `gainmap`: The gain map doc://com.apple.coreimage/documentation/CoreImage/CIImage instance to apply to the receiver.
- `headroom`: A float value that specify how much headroom the resulting image should have. The headroom value will be limited to between 1.0 (i.e. SDR) and the full headroom allowed by the gain map.

## Return Value

Return Value  An autoreleased CIImage instance or the received image.

## See Also

### Instance Methods

- [applyingGainMap(_:)](coreimage/ciimage/applyinggainmap(_:).md)
