-
Notifications
You must be signed in to change notification settings - Fork 777
Open
Labels
Description
Describe the bug
The image is no antialiased when loaded from code in the following specific case. In the following screenshot you can clearly see the difference.
Why is this important?
The image loaded in such way looks like early 2000, it contrasts with Fluent UI.
Steps to reproduce the bug
<Image Name="PixelatedImage" Height="48" />
<Image Name="GoodImage" Height="48" />StorageFile fi = await StorageFile.GetFileFromPathAsync("..../github.png");
BitmapImage bitmapImage1 = new();
using IRandomAccessStream stream = await fi.OpenAsync(FileAccessMode.Read);
await bitmapImage1.SetSourceAsync(stream);
PixelatedImage.Source = bitmapImage1;
BitmapImage bitmapImage2 = new();
using IRandomAccessStream stream2 = await fi.OpenAsync(FileAccessMode.Read);
GoodImage.Source = bitmapImage2;
await bitmapImage2.SetSourceAsync(stream2);The difference betwween the 2 is the order between Source assignation and BitmapImage.SetSourceAsync.
Actual behavior
The actual behavior is visibile in the screenshot.
Expected behavior
No response
Screenshots
NuGet package version
WinUI 3 - Windows App SDK 1.8.2: 1.8.251003001
Windows version
Windows 10 (21H2): Build 19044
Additional context
A very similar issue was already present in uwp https://stackoverflow.com/questions/42189063/image-smoothing-in-uwp-app
Metadata
Metadata
Assignees
Labels
Type
Projects
Status
Backlog