On Sat, Dec 29, 2012 at 12:08:52PM -0300, Italo Mendon?a Rocha wrote:
>
> I have an application that uses the Camera and SurfaceView to take
> pictures. When I take photos by Galaxy S2 or smaller devices the picture
> resolution is perfect. But when I try to take pictures by Galaxy S3 or
> tablets the picture resolution is too low. I use the following code:
>
> camera.takePicture(null, callBack, callBack, callBack);
>
> private PictureCallback callBack = new PictureCallback() {
> @Override
> public void onPictureTaken(byte[] data, Camera camera) {
> if (data != null) {
> savePhoto(data);
> }
> }
> };
>
> Any idea how to solve this?
Yes. Based on your code, you aren't specifying the image size, so you
get what the device sets as the default. While working on my camera app,
I have seen devices that set the maximum as the default, and some that
set the minimum as the default. You need to determine the available
image sizes for the device the app is running on (see camera.parameters)
and either select one, or better still, let the USER select the image
size THEY want to use. The user might want the max, or they might want
a smaller image (say, for sending in an e-mail, using in a web page,
etc., without having to resize it). Again, see camera.parameters.
Later,
--jim
--
THE SCORE: ME: 2 CANCER: 0
73 DE N5IAL (/4) MiSTie #49997 < Running Mac OS X Lion >
[email protected] ICBM/Hurr.: 30.44406N 86.59909W
"Now what *you* need is a proper pint of porter poured in a proper
pewter porter pot.." --Peter Dalgaard in alt.sysadmin.recovery
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en