camera-samples
camera-samples copied to clipboard
CameraXBasic - How to config aspect ratio is 1:1
I want to preview and take picture with aspect ratio is 1:1. How to do that? Thanks.
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)