availableRawPhotoPixelFormatTypes empty when taking RAW image

128 Views Asked by At

I'm working on a library to capture RAW images on iPhones camera. Official documentation and various Apple developer videos provides no fully working example but only chunk of codes.

When I run this code:

let capturePhotoOutput = AVCapturePhotoOutput()
capturePhotoOutput.isHighResolutionCaptureEnabled = true
let rawTypes = capturePhotoOutput?.availableRawPhotoPixelFormatTypes

I expect rawTypes filled with pixel format that can be feed into AVCapturePhotoSettings(rawPixelFormatType:) however this array is empty.

I'm working with an iPhone 11 Pro (selected the standard wide camera) under iOS 15.1 and XCode 13.1.

Any clue is appreciated but much more appreciated a fully working example (project) that capture a RAW picture.

0

There are 0 best solutions below