Reputation: 25102
For some reasons when I use camera setPictureSize the camera preview is become distort. Have anybody face that problem?
Upvotes: 1
Views: 1054
Reputation: 25102
According to my experience there is a dependency between setPictureSize and camera preview size.
Most of tutorials like official (http://developer.android.com/reference/android/hardware/Camera.html) calculates preview size depending on actual screen size. But this won't work with actual picture size. So I now calculate optimal preview size according to selected picture size.
I would recommend to look at Android camera source code of Android 2.3 that is not so complicated: https://android.googlesource.com/platform/packages/apps/Camera.git/+/android-cts-2.3_r12
Upvotes: 2