0
var contactStore = await ContactManager.RequestStoreAsync();
Contact Mycontact = await contactStore.GetContactAsync(contact.Id);
if (Mycontact.Thumbnail != null)
{
using (IRandomAccessStreamWithContentType stream = await Mycontact.Thumbnail.OpenReadAsync())
{
// todo: get bitmapimage
}
}
我试着用下面的代码从UWP中获取我的联系人图片。我的问题是:我不知道如何从IRandomAccessStreamWithContentType得到一个位图如何将IRandomAccessStreamWithContentType转换为BitMapImage UWP?
我怎样才能得到它呢?
请参考[这里](https://stackoverflow.com/questions/15328084/convert-irandomaccessstreamwithcontenttype-to-byte)的答案。 – CodingYoshi
[将IRandomAccessStreamWithContentType转换为字节\ [\]]的可能重复(https://stackoverflow.com/questions/15328084/convert-irandomaccessstreamwithcontenttype-to-byte) – Razor