0
我想獲取使用我的應用拍攝的照片的縮略圖。但我沒有得到它使用下面的代碼。請幫忙。 下面是代碼:我想獲取使用我的應用拍攝的照片的縮略圖
Intent i = new
Intent(android.provider.MediaStore.ACTION_IMAGE_CAPTURE);
File file = new
File(Environment.getExternalStorageDirectory(), "MyImages");
file.mkdirs();
File image = new File(file, "picture1" + ".png");
Uri uriSavedImage = Uri.fromFile(image);
i.putExtra(MediaStore.EXTRA_OUTPUT, uriSavedImage);
final int THUMBSIZE = 64;
Bitmap ThumbImage = ThumbnailUtils.extractThumbnail(BitmapFactory.decodeFile(image.getPath()),
THUMBSIZE, THUMBSIZE);
startActivity(i);