Son
Son

Reputation: 1863

Why the screen resolution ratio is not the same as screen dimension ratio?

I'm developing an Android application to take pictures and notice that the screen dimension ratio (480/800=0.6 for my HTC Desire X) is not the same as the picture resolution (1552/2592=0.5987) when I take picture by the default Camera application.The application has a fullscreen preview.

Does anyone know why there is this tiny difference ? And how does the default application handle this variance ?

Thanks !

Upvotes: 1

Views: 346

Answers (1)

Daniel Smith
Daniel Smith

Reputation: 8579

When you are initializing the camera, you can set a number of different parameters. The relevant ones to this question are preview size and picture size. If you are using the standard method of taking pictures (the takePicture() method), the picture size will be set using setPictureSize() method for the camera parameters.

The preview size (you mentioned that you have fullscreen preview) is set independently of the picture size.

To set preview size, look at the supported preview sizes, and then set the preview size.
To set the picture size, look at the supported picture sizes, and then set the picture size.

Upvotes: 1

Related Questions