unoplatform / uno

Build Mobile, Desktop and WebAssembly apps with C# and XAML. Today. Open source and professionally supported.
https://platform.uno
Apache License 2.0
8.45k stars 686 forks source link

[Skia] Image rendering is not smooth for transparent .png #16519

Closed MartinZikmund closed 2 weeks ago

MartinZikmund commented 2 weeks ago

Current behavior

The same transparent .png renders quite jagged on Skia targets vs other targets including WinAppSDK:

image

Expected behavior

image

How to reproduce it (as minimally and precisely as possible)

No response

Workaround

No response

Works on UWP/WinUI

None

Environment

No response

NuGet package version(s)

No response

Affected platforms

Skia (WPF), Skia (Linux X11), Skia (macOS), Skia (Linux Framebuffer), Skia (GTK)

IDE

No response

IDE version

No response

Relevant plugins

No response

Anything else we need to know?

No response

Youssef1313 commented 2 weeks ago

@MartinZikmund This looks like the same issue I was facing that I was going to open an issue for today :)

Image rendering will start using different APIs to ease support for Gifs starting with https://github.com/unoplatform/uno/pull/15951. So we should first evaluate if https://github.com/unoplatform/uno/pull/15951 will have any impact, and build a fix on top of that.

agneszitte commented 2 weeks ago

The issue is visible on the TubePlayer Sample app (Single Project) as well for .jpg images that are not transparent Sample for repro: TubePlayer.zip - Uno.Sdk: 5.2.108 | (Details for the Youtube API Key for appsettings.development.json if needed)

@Youssef1313 I can reproduce the issue as well on the TubePlayer Sample app (non-Single Project) using previous 5.1 version. Sample for repro TubePlayer.zip - Uno.WinUI: 5.1.87

image