<!--
{
  "availability" : [
    "iOS: 14.1.0 -",
    "iPadOS: 14.1.0 -",
    "macCatalyst: 14.1.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIImageRepresentationOption/hdrGainMapImage",
  "metadataVersion" : "0.1.0",
  "role" : "Type Property",
  "symbol" : {
    "kind" : "Type Property",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:@kCIImageRepresentationHDRGainMapImage"
  },
  "title" : "hdrGainMapImage"
}
-->

# hdrGainMapImage

An optional key and value to save a gain map channel to a JPEG or HEIF.

```
static let hdrGainMapImage: CIImageRepresentationOption
```

## Discussion

The value for this key needs to be a monochrome [`CIImage`](/documentation/CoreImage/CIImage) instance.

If the [`hdrGainMapAsRGB`](/documentation/CoreImage/CIImageRepresentationOption/hdrGainMapAsRGB) option it true, then it needs to
be an RGB [`CIImage`](/documentation/CoreImage/CIImage) instance.

The `/CIImage/properties` should contain metadata information equivalent to what is returned when
initializing an image using [`auxiliaryHDRGainMap`](/documentation/CoreImage/CIImageOption/auxiliaryHDRGainMap).

---

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)