android 中用Intent提取缩略图和原始图像
2010-05-31 14:51:00 来源:WEB开发网核心提示:在 onActivityResult 中protected void onActivityResult(int requestCode, int resultCode, Intent data) {if (resultCode != RESULT_OK) {return;}Bitmap bitmap = null;Co
在 onActivityResult 中
protected void onActivityResult(int requestCode, int resultCode, Intent data) {
if (resultCode != RESULT_OK) {
return;
}
Bitmap bitmap = null;
ContentResolver resolver = getContentResolver();
if (requestCode == REQUEST_CODE_PHOTO_PICKED) {
try {
Uri originalUri = data.getData();
bitmap = MediaStore.Images.Media.getBitmap(resolver, originalUri );
} catch (IOException e) {
}
}
}
更多精彩
赞助商链接