how to get the proraw image output with 1:1, 16:9

64 views Asked by At

Now I use AVFoundation framework to get the photo output, but the image aspect ratio is 4:3. But according to the Camera app in the iPhone 13 Pro, it has server image aspect ratio: 4:3, 16:9 and 1:1 when take the proraw image. So how can I get the 1:1, 16:9 aspect ratio proraw image?

After I do some research, I find that no matter you use which kinds of camera in the iPhone 11, 12, 13, 14, 15 or Pro, the result image is always 4:3, 1:1 and 16:9 come from the 4:3 cropping. If it is true, how can I crop the proraw file without any data lossing?

My developer environment:

iPhone 13 Pro iOS 16.7 xcode 14.3.1

This is the session configuration and device output code for the camera. https://gist.github.com/qihuijia/5fc78cdd6cece965929e5995713f0ac9

After I tried it, the result image aspect ratio is still 4:3

0

There are 0 answers