I am using CameraIntent
in my Application but the photo in the app got different resolution from the photo that is saved on the SDCard.
I am using the following code:
Intent mCameraIntent = new Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
mCameraIntent.putExtra("android.intent.extras.CAMERA_FACING", 1);
startActivityForResult(mCameraIntent, mCameraRequest);
protected void onActivityResult(int requestCode, int resultCode, Intent data)
{
if(requestCode == mCameraRequest)
{
Bitmap photo = (Bitmap)data.getExtras().get("data");
int width = photo.getWidth();
int height = photo.getHeight();
}
}
The value of width is 320 and the value of height is 200, and on the SDCard the resolution of the photo is 2592x1552. I need the exact Width and Height in order to resize the photo for the desired resolution. What I am doing wrong? Are the getWidth()
and getHeight()
returning wrong values or?