Hello everyone, i am looking to get the accurate aspect ratio of the camera feed, but the returned frame does not return the values i expect.
My iPhone 11 Pro Max reports that the resolution is 1920x1440, which is fine for the image, but it does not represent how i need the image to look when wanting to save it or present it in a custom way.
How can i reliably get the intended aspect ratio of how the frame is supposed to be presented?
The following code only returns the resolution of the AR feed in an unscaled format:
// Get the latest frame and print the size
XRCpuImage frame;
while(!_cameraManager.TryAcquireLatestCpuImage(out frame))
await Task.Delay(50);
Debug.Log(frame.width);
Debug.Log(frame.height);
A visualization of the issue:
Frame returned straight from AR Foundation:
Same frame scaled to 16:9: