<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVDepthData/dictionaryRepresentation(forAuxiliaryDataType:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVDepthData(im)dictionaryRepresentationForAuxiliaryDataType:"
  },
  "title" : "dictionaryRepresentation(forAuxiliaryDataType:)"
}
-->

# dictionaryRepresentation(forAuxiliaryDataType:)

Returns a dictionary representation of the depth data suitable for writing into an image file.

```
func dictionaryRepresentation(forAuxiliaryDataType outAuxDataType: AutoreleasingUnsafeMutablePointer<NSString?>?) -> [AnyHashable : Any]?
```

## Parameters

`outAuxDataType`

On output, either <doc://com.apple.documentation/documentation/ImageIO/kCGImageAuxiliaryDataTypeDisparity> or <doc://com.apple.documentation/documentation/ImageIO/kCGImageAuxiliaryDataTypeDepth>, depending on the depth data’s type.

## Discussion

When using `CGImageDestination` functions to write depth data (along with image data) to a HEIF, JPEG, or DNG file, you can use this method to obtain a dictionary of primitive depth map information, then use the <doc://com.apple.documentation/documentation/ImageIO/CGImageDestinationAddAuxiliaryDataInfo(_:_:_:)> function to embed that data into the output file.

---

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)