Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Windows] [.NET 9.0 Preview 5] App icon in the taskbar is pixelated #23212

Open
TommiGustafsson-HMP opened this issue Jun 24, 2024 · 7 comments
Assignees
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/windows 🪟 t/bug Something isn't working

Comments

@TommiGustafsson-HMP
Copy link

TommiGustafsson-HMP commented Jun 24, 2024

Description

This is a .NET MAUI App using .NET MAUI 9.0 Preview 5 and .NET SDK 9.0 Preview 5. This bug pertains to the Windows platform (WinUI 3).

The Problem

Our app logo is pixelated in the task bar, when I start it in the Debug mode.

I have two screens. One at 100% scaling and the other at 200% scaling. The 100% screen shows it like this:

pixelated1

The 200% screen shows it like this:

pixelated2

The original image is this:

appicon

Resizetizer seems to work OK, and all image sizes are created in obj\Debug\net9.0-windows10.0.19041.0\win10-x64\resizetizer\r.

Steps to Reproduce

  1. Build GnollHack for MAUI Windows using these instructions:
    https://github.com/hyvanmielenpelit/GnollHack/wiki/Development-Information

  2. Start the Game in Debug mode.

Link to public reproduction project repository

https://github.com/hyvanmielenpelit/GnollHack

Version with bug

Unknown/Other

Is this a regression from previous behavior?

Not sure, did not test other versions

Last version that worked well

Unknown/Other

Affected platforms

Windows

Affected platform versions

No response

Did you find any workaround?

Not yet.

Relevant log output

No response

@TommiGustafsson-HMP TommiGustafsson-HMP added the t/bug Something isn't working label Jun 24, 2024
Copy link
Contributor

Hi I'm an AI powered bot that finds similar issues based off the issue title.

Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it. Thank you!

Open similar issues:

Closed similar issues:

Note: You can give me feedback by thumbs upping or thumbs downing this comment.

@jfversluis jfversluis added area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/windows 🪟 labels Jun 24, 2024
@TommiGustafsson-HMP
Copy link
Author

The question is why isn't the taskbar icon using appiconLogo.targetsize-256.png even though it is used everywhere else, such as in search results.

@TommiGustafsson-HMP
Copy link
Author

Investigating this, it seems that everything is working as intended. The problem was that the original image does not work well when downsized to 24x24 (taskbar size) and 48x48 (taskbar size at a 200% scale), wherefore the remedy is to redesign the logo so that it works better in small resolutions.

@TommiGustafsson-HMP
Copy link
Author

I am reopening this issue, because Resizetizer is responsible for the low quality icon, when downsized. If I create a 24x24 icon in Photoshop, it looks fine.

@TommiGustafsson-HMP
Copy link
Author

Here are examples how the images should look like when scaled down properly:

24x24

gnollhack-icon-v2-512-24_x_24

48x48

gnollhack-icon-v2-512-48_x_48

We see that the quality produced by Resizetizer is awful compared to almost any other resizing tool.

@janne-hmp
Copy link

@mattleibow Would it be possible to get Resizetizer to use bicubic interpolation in resizing? This should result in much better quality than currently. (Looks like nearest-neighbor interpolation or the like.)

@janne-hmp
Copy link

@mattleibow You should most likely use SKBitmap.ScalePixels(destPixmap, SKFilterQuality.High) to scale the bitmaps rather than SKCanvas.Scale.

@Foda Foda self-assigned this Jun 25, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-single-project Splash Screen, Multi-Targeting, MauiFont, MauiImage, MauiAsset, Resizetizer platform/windows 🪟 t/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

4 participants