---
title: "dictionaryRepresentation(forAuxiliaryDataType:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avdepthdata/dictionaryrepresentation(forauxiliarydatatype:)"
---

# dictionaryRepresentation(forAuxiliaryDataType:)

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

## Declaration

```swift
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

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 CGImageDestinationAddAuxiliaryDataInfo(_:_:_:) function to embed that data into the output file.

## See Also

### Creating depth data

- [init(fromDictionaryRepresentation:)](avfoundation/avdepthdata/init(fromdictionaryrepresentation:).md)
