---
title: "converting(toDepthDataType:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avdepthdata/converting(todepthdatatype:)"
---

# converting(toDepthDataType:)

Returns a derivative depth data object by converting the depth data map to the specified data type.

## Declaration

```swift
func converting(toDepthDataType depthDataType: OSType) -> Self
```

## Parameters

- `depthDataType`: The data type to convert to. This value must be one of the formats present in the doc://com.apple.avfoundation/documentation/AVFoundation/AVDepthData/availableDepthDataTypes-472g0 array.

## Return Value

Return Value A new, converted depth data object.

## Discussion

Discussion This method raises an exception if you pass an invalid depthDataType value.

## See Also

### Transforming and processing

- [applyingExifOrientation(_:)](avfoundation/avdepthdata/applyingexiforientation(_:).md)
- [availableDepthDataTypes](avfoundation/avdepthdata/availabledepthdatatypes-3ifx1.md)
- [replacingDepthDataMap(with:)](avfoundation/avdepthdata/replacingdepthdatamap(with:).md)
