We know that we will get a lager field of preview at the same distance when camera preview ratio set to 4:3
instead of 16:9
, the detail is as follows:
Android Camera API - Weird zoom effect
But I encountered a problem when I worked with android camera preview with opengl, that is the second way mentioned below.
There are 2 ways of implementing camera preview:
- Traditional way without opengl, just use
Camera.setPreviewTexture(SurfaceTexture texture)
orCamera.setPreviewDisplay(SurfaceHolder holder)
- The way of
ContinuousCaptureActivity
using opengl, we render the preview image with APIswapBuffers()
.
The first way is OK, I will find that preview field become larger if preview ratio changed from 16:9 to 4:3.
However,The second way is not OK in some android phones, the preview field stay the same when preview ratio changed and the preview field is smaller than the first way at the ratio 4:3. I insist that this is an error, I want to resolve this problem very much, Who can give me some advices?