3

I'm using the standard camera intent to take a photo:

Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(takePictureIntent, actionCode);

And then in onActivityResult()

Bundle extras = intent.getExtras();
Bitmap imageBitmap = (Bitmap) extras.get("data");
mImageView.setImageBitmap(imageBitmap);

Bitmap is a thumbnail. That's great - I don't need full size images.

Before user can take a photo, I display a default thumbnail that they can click and that will open the camera. However, I don't know what to size the default thumbnail.

  1. Would the camera app return thumbnails of different size per device?
  2. Is there an Android standard?
  3. Will some devices return really small or really large thumbnails? In that case I need to specify the size before hand. How can I do that?

MediaStore.Images.Thumbnails.MICRO_KIND is 96x96. http://developer.android.com/reference/android/provider/MediaStore.Images.Thumbnails.html Is that the size being returned by default?

amit
  • 1,373
  • 2
  • 16
  • 29

1 Answers1

1

Size of the thumbnail is determined by the camera capabilities. Camera.Parameters class defines getJpegThumbnailSize() method.

Alex Cohn
  • 56,089
  • 9
  • 113
  • 307