camera-samples icon indicating copy to clipboard operation
camera-samples copied to clipboard

CameraXBasic - How to config aspect ratio is 1:1

Open phongbm opened this issue 2 years ago • 1 comments

I want to preview and take picture with aspect ratio is 1:1. How to do that? Thanks.

phongbm avatar Apr 04 '22 10:04 phongbm

if you look to the class of camerax you know the options of aspect ratio is 4_3 and 16_9 but if make the size is customized you can get the aspect ratio wanted use setTargetResolution in imageAnalysis and make the size like this Size(widthOfScreen,widthOfScreen)

kareemalkoul avatar Jul 21 '22 14:07 kareemalkoul