问题
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 the image gets squashed and stretched in the preview.
回答1:
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.
来源:https://stackoverflow.com/questions/6545533/android-resizing-camera-preview