How can I change the resolution of the CWAC camera before taking the picture, I am using the CWAC camera demo. I allready got the supported sizes.
1 Answers
Quoting the documentation:
...your CameraHost will be called with getPictureSize(), for you to return the desired Camera.Size of the still images taken by the camera. You are simply passed the Camera.Parameters, on which you can call getSupportedPictureSizes() to find out the possible picture sizes that you can choose from.
The CameraUtils class has a pair of methods for simple algorithms for choosing a picture size:
getLargestPictureSize() returns the Camera.Size that is the largest in area
getSmallestPictureSize() returns the Camera.Size that is the smallest in area
SimpleCameraHost uses getLargestPictureSize() for the default implementation of getPictureSize(). You can override getPictureSize() and substitute in your own selection algorithm. Just make sure that the returned size is one of the ones returned by getSupportedPictureSizes().

- 986,068
- 189
- 2,389
- 2,491
-
OK, thanks, I did it. But the real picture size that I got after taken a picture is always half of the Picture Size I set, Is there any way to avoid that? – Dov Mar 10 '15 at 08:31
-
@Dov: Sorry, but I have never seen that behavior. – CommonsWare Mar 10 '15 at 10:34