开发者

How to preview full-size when taking photo on Android with hardware.Camera

开发者 https://www.devze.com 2023-03-24 01:12 出处:网络
I\'m using android.hardware.Camera to take photos.And this is my settings: Camera.Parameters p = mCamera.getParameters();

I'm using android.hardware.Camera to take photos. And this is my settings:

Camera.Parameters p = mCamera.getParameters();

p.setPreviewSize(320, 240);

mCamera.setParameters(p);

And the resolution of my phone is just 320*240,so 开发者_开发百科this is the max preview size.

This picture is what I see in the full screen preview. It's only the left-middle part of the full picture when I take the photo.

How to preview full-size when taking photo on Android with hardware.Camera

And I took a picture at the resolution of 1024*768:

params.setPictureSize(1024, 768);

How to preview full-size when taking photo on Android with hardware.Camera

Can you tell me how to preview the full picture that I'm going to take?


Finally I found the answer.
This is nothing about settings and nothing about Camera.
I just didn't set fill_parent in the layout of the SurfaceView!
Sorry for asking such a stupid question.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号