【发布时间】:2014-03-13 03:04:42
【问题描述】:
我正在尝试使用以下代码从我的联系人中获取更大尺寸的图片:
Uri my_contact_Uri = ContentUris.withAppendedId(ContactsContract.Contacts.CONTENT_URI, Long.parseLong(contactId));
InputStream photo_stream = ContactsContract.Contacts.openContactPhotoInputStream(getContentResolver(), my_contact_Uri);
if(photo_stream != null)
{
BufferedInputStream buf =new BufferedInputStream(photo_stream);
Bitmap my_btmp = BitmapFactory.decodeStream(buf);
profile.setImageBitmap(my_btmp);
}
else
{
profile.setImageResource(R.drawable.contactpic);
}
我有一个imageview 和match_parent(宽度和高度)。
所有联系人的照片都是模糊的。我确定它正在拍摄缩略图。如何获得大图?
【问题讨论】: