On running the Camera2Basic in 18:9 screen aspect ratio devices, the image preview and captured image is getting stretched.
Device camera and camera2 basic side by side:
How would i resolve this while keeping the preview ratio as 1.33? I tried setting the height of the texture preview by keeping the ratio 1.33 as constant and scaling the height with width as 1080.
var ratio = 1.33;
var scaledWidth = mPreviewSize.Height;
var scaledHeight = (int)Java.Lang.Math.Round(scaledWidth * ratio);
mTextureView.SetAspectRatio(scaledWidth, scaledHeight);
But result is still the same.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.