开发者

Android Resizing Camera Preview

Is there anyway to show the camera preview in an unsupported preview size?

The app I'm making requires an image size of 800x480 but the preview needs to be 480x800. Is there anyway to do this? When I try changing the parameters t开发者_如何学编程he image gets squashed and stretched in the preview.


You can only use supported preview sizes.

use:

Parameters params = myCamera.getParameters();

List<Size> previewsizes = params.getSupportedPreviewSizes();

Pick a preview size that is the closest to what you want and use that.
It's as close as you can get.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜