CameraKit / camerakit-android

Library for Android Camera 1 and 2 APIs. Massively increase stability and reliability of photo and video capture on all Android devices.
https://camerakit.io
MIT License
5.36k stars 878 forks source link

How to shoot square and square images? #552

Open Steadyoung opened 5 years ago

Steadyoung commented 5 years ago

How to shoot square and square images?

Steadyoung commented 5 years ago

How to shoot square video and square images?

TrentPierce commented 4 years ago

Would also love to know this. The docs dont show how to do this.

MikelCalvo commented 4 years ago

You just have to add this:

XML app:camera_aspectRatio="1"
Java cameraKitView.setAspectRatio(1f)

With that the camera will be a square

wangchang163 commented 4 years ago

您只需要添加以下内容:

XML格式 app:camera_aspectRatio =“ 1” 爪哇 cameraKitView.setAspectRatio(1f) 这样,相机将成为正方形

只是预览变成了正方形,拍摄返回的图片跟预览不一致怎么解决?拍摄得到的照片是全屏的