[英]How can I set an Image.Source from a StorageFile without losing quality?
using (IRandomAccessStream fileStream = await file.OpenAsync(Windows.Storage.FileAccessMode.Read))
{
BitmapImage bitmapImage = new BitmapImage();
await bitmapImage.SetSourceAsync(fileStream);
myImage.Source = bitmapImage;
}
Leaving out height and width will get me the full image! 不考虑高度和宽度,我将获得完整的图像!
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.