Android camera preview format on tablets 4: 3

I have a 4: 3 tablet (op3n dott) which has front and rear cameras. If I get the preview dimensions with getSupportedPreviewSizes()

, then the current dimensions are reported: b / b>

**Back camera:**
1024*576
720*480
640*480
640*360
352*288
320*240
176*144

**Front camera:**
1280*720
1024*576
640*480
176*144

      

When I set the size to 1024 * 576 for the rear camera and the preview layout is resized to that size, the image shown in the preview is stretched. If the preview layout is resized to 4: 3, so the image is stretched to 1024 * 768, the image looks fine.

With a front camera and a preview size of 1280 * 720, the preview image is excellent without any gimmicks.

When I use 640x480 preview size for both cameras, the image looks fine.

So the conclusion is that a rear camera with a preview size of 1024 * 576 (16: 9) is a real 4: 3 image.

I have a friend who has an hp touchpad with a similar problem.

My question is , how can I know when the 16: 9 preview image is a real 4: 3 stitched image? Can I use 640x480 preview size for 4: 3 tablets to fix this issue. ?

+3


source to share


1 answer


I believe you should resize your (pre-) constrained "measureSpec" view when included in onMeasure () so that it appears on screen without stretching or shrinking. You may end up with empty spaces on one side or the other if the available property has a different aspect ratio.



0


source







All Articles