Reputation: 47
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.
Upvotes: 0
Views: 55
Reputation: 47
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!
Upvotes: 1