什么是ACTION_IMAGE_CAPTURE意图返回缩略图大小 [英] What is size of thumbnail returned by ACTION_IMAGE_CAPTURE intent
问题描述
我使用的是标准的相机意图拍摄照片:
I'm using the standard camera intent to take a photo:
Intent takePictureIntent = new Intent(MediaStore.ACTION_IMAGE_CAPTURE);
startActivityForResult(takePictureIntent, actionCode);
然后在的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.
- 请问相机应用返回每个设备的不同尺寸的缩略图?
- 有一个Android的标准呢?
- 将一些设备返回真的很小还是真的大缩略图?在这种情况下,我需要用手前指定的大小。我该怎么做?
MediaStore.Images.Thumbnails.MICRO_KIND为96×96。
的http://developer.android.com/reference/android/provider/MediaStore.Images.Thumbnails.html
是大小被默认返回?
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?
推荐答案
缩略图的大小是由相机的功能决定的。 Camera.Parameters
类定义的 getJpegThumbnailSize()方法
Size of the thumbnail is determined by the camera capabilities. Camera.Parameters
class defines getJpegThumbnailSize() method.
这篇关于什么是ACTION_IMAGE_CAPTURE意图返回缩略图大小的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!