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

# applyingGainMap(_:)

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

## Declaration

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

## Return Value

Return Value  An autoreleased CIImage instance or the received image.

## Discussion

Discussion The gain map image can be obtained by creating a CIImage instance from NSURL/NSData and setting the auxiliaryHDRGainMap option set to @YES. If the gain map CIImage instance doesn’t have the needed properties metadata, the received image will be returned as-is.

## See Also

### Instance Methods

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