Here is a way that I found and it works, but if my image becomes bigger than the values here it loses quality. My image also doesn't have a fixed size, so I would prefer to get it with the original 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!
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.