---
title: "adding(headroomAdaptiveGainCurveMetadata:options:)"
framework: colorsync
role: symbol
role_heading: Instance Method
platforms: [iOS 27.0+, iPadOS 27.0+, Mac Catalyst 27.0+, macOS 27.0+, tvOS 27.0+, visionOS 27.0+, watchOS 27.0+]
path: "colorsync/colorsyncprofile/adding(headroomadaptivegaincurvemetadata:options:)"
---

# adding(headroomAdaptiveGainCurveMetadata:options:)

Returns a copy of this profile with raw Headroom Adaptive Gain Curve data embedded as an HAGC tag.

## Declaration

```swift
func adding(headroomAdaptiveGainCurveMetadata: Data, options: ColorSyncProfile.HeadroomAdaptiveGainCurveOptions = .init()) -> ColorSyncProfile?
```

## Parameters

- `headroomAdaptiveGainCurveMetadata`: The raw HAGC payload to embed.
- `options`: Options that configure embedding. Reserved for future use.

## Mentioned in

Authoring Headroom Adaptive Gain Curve metadata

## Return Value

Return Value A new profile carrying the HAGC tag, or nil if this profile’s transfer function isn’t PQ, HLG, or linear, or if embedding fails.

## Discussion

Discussion Use this to move an HAGC between profiles without interpreting it — for example, to carry the HAGC payload read from one profile into another, or one shared with a video stream (SMPTE ST 2094-50 payload). The original profile is unchanged.

## See Also

### Attaching a curve in Swift

- [adding(headroomAdaptiveGainCurve:)](colorsync/colorsyncprofile/adding(headroomadaptivegaincurve:).md)
- [ColorSyncProfile.HeadroomAdaptiveGainCurveOptions](colorsync/colorsyncprofile/headroomadaptivegaincurveoptions.md)
