converting(toDepthDataType: kCVPixelFormatType_DepthFloat16) does not work

an AVDepthData class method converting(toDepthDataType: kCVPixelFormatType_DepthFloat16) does not work.

let depthData = photo.depthData depthData.converting(toDepthDataType: kCVPixelFormatType_DepthFloat16) let ddType = depthData.depthDataType

ddType value is 1751411059 which means kCVPixelFormatType_DisparityFloat16.

How do I get the DepthFloat16 format data?

Sorry. It was a rookie mistake.

let dd = photo.depthData.converting(toDepthDataType: kCVPixelFormatType_DepthFloat16); let ddType = dd.depthDataType; ddType value is 1751410032 which means kCVPixelFormatType_DepthFloat16.

It is working.

converting(toDepthDataType: kCVPixelFormatType_DepthFloat16) does not work
 
 
Q