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.
精彩评论