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

The Desktop Icon of the exported executable is blurry #64073

Closed
Nikzea opened this issue Aug 7, 2022 · 31 comments · Fixed by #68828
Closed

The Desktop Icon of the exported executable is blurry #64073

Nikzea opened this issue Aug 7, 2022 · 31 comments · Fixed by #68828

Comments

@Nikzea
Copy link

Nikzea commented Aug 7, 2022

Godot version

3.5 Steam version

System information

Windows10

Issue description

The Desktop Icon of the executable is blurry and I don't know how to fix this. I already redownloaded rcedit, cleared the cache, restarted the computer and reexported the project, but it is still blurry. (the .pck is not embeded)
Capture
Please help me

Steps to reproduce

It worked fine 2 weeks ago, but yesterday, when I wanted to export my game, a error message appeared, saying I would need to update to 3.5. After the update finished, I exported the game, but for some reason the Desktop icon was really blurry.

Minimal reproduction project

No response

@Calinou
Copy link
Member

Calinou commented Aug 7, 2022

This is not a Godot issue. The .ico file you're using needs to contain all the sizes required for proper hiDPI support. There's an ImageMagick command listed in the documentation which you can use for this purpose.

Also, the .ico file must be generated from a PNG image that is at least 256×256 pixels. You can't upscale an image from a low resolution and expect it to look detailed at higher sizes.

If you still have trouble after following the above suggestions, please upload the .ico file here (within a ZIP archive so GitHub allows it).

@Nikzea
Copy link
Author

Nikzea commented Aug 7, 2022

Thank you for the reply
The .ico file contains all sizes which are suggested in the docs, also it worked earlier only after the update it doesn't work.
Ico.zip

@SilencedPerson
Copy link

image
I zoomed in on it, it works in windows by itself so that means Godot malforms it no?
Could you download resource hacker and check if the icon is properly overridden?

@OURABIG
Copy link

OURABIG commented Aug 7, 2022

download image magic display then converts the png to ico using this command:
magick convert icon.png -define icon:auto-resize=256,128,64,48,32,16 icon.ico

then add it to you're project and export it to a different folder then it's good

@Nikzea
Copy link
Author

Nikzea commented Aug 7, 2022

Silenced Person I downloaded resource hacker what should I do now?

Outseet I already have a ico file why do it again?

@OURABIG
Copy link

OURABIG commented Aug 7, 2022

@Nikzea because it's giving more quality and resolution are great and also it'S better and faster than do it your self and it's in Godot documentation I think using image magic display is going to fix it

@OURABIG
Copy link

OURABIG commented Aug 7, 2022

@Nikzea also change the export to a new path

@SilencedPerson
Copy link

SilencedPerson commented Aug 7, 2022

Silenced Person I downloaded resource hacker what should I do now?

Outseet I already have a ico file why do it again?

Drag and drop your game.exe into the resource hacker.
image
You should see something like this but all the Godot icons should be replaced by your icon.

Is that correct?

@OURABIG
Copy link

OURABIG commented Aug 7, 2022

@SilencedPerson yes it's correct he need that his .ico file have all the resolution:
256,128,64,48,32,16
and this by using a software scale it like gimp or fastest way is using ImageMagick

@SilencedPerson
Copy link

@SilencedPerson yes it's correct he need that his .ico file have all the resolution: 256,128,64,48,32,16 and this by using a software scale it like gimp or fastest way is using ImageMagick

Outseet, his Icon does indeed have all the correct resolutions, we are trying to determine if Godot malforms it. ImageMagic won't help in this case as we are not determining if he has correct formatting but if Godot has a bug or not.

@OURABIG
Copy link

OURABIG commented Aug 7, 2022

@SilencedPerson yes it's correct he need that his .ico file have all the resolution: 256,128,64,48,32,16 and this by using a software scale it like gimp or fastest way is using ImageMagick

Outseet, his Icon does indeed have all the correct resolutions, we are trying to determine if Godot malforms it. ImageMagic won't help in this case as we are not determining if he has correct formatting but if Godot has a bug or not.

i was using gimp and it'S giving me blurry icon and I have all resolution when I used ImageMagick it worked and it's great

@OURABIG
Copy link

OURABIG commented Aug 7, 2022

wait i have found something did you Clear the Icon Cache it maybe works I found it on youtube and documentation

@SilencedPerson
Copy link

SilencedPerson commented Aug 7, 2022

That is still not the point, his icon is correct.
Godot should be able to use it.

Please, stop pointlessly commenting and read the issue again, he did clear his cache and the ICON did work in the past.

@OURABIG
Copy link

OURABIG commented Aug 7, 2022

That is still not the point, his icon is correct. Godot should be able to use it.

Please, stop pointlessly commenting and read the issue again, he did clear his cache and the ICON did work in the past.

ok but i use the same version and it's working maybe it's a bug

@blipk
Copy link

blipk commented Aug 8, 2022

he did clear his cache and the ICON did work in the past.

Clearing font icon caches in windows is notoriously unreliable, something could have corrupted on one export, and then be fixed but windows might not decide to display it for another few days.

@Nikzea
Copy link
Author

Nikzea commented Aug 8, 2022

Sorry for only replying now, but I went to bed.
Capture2
You can also download the exe on itch
https://nikzea.itch.io/marble-testing-facility

@Nikzea
Copy link
Author

Nikzea commented Aug 8, 2022

Oh I think I see the Problem for some reason the images are assigned to the wrong resolution

@SilencedPerson
Copy link

Yep, they seem to be in inverse order. Can you somehow verify that this is problem with the ICON? Or does this happen in Godot?
It seems to me that it is the later, since the icon works before the project is imported.

@Nikzea
Copy link
Author

Nikzea commented Aug 8, 2022

I reversed the order in gimp and now resource hacker shows it in the right order but it is still blurry
Capture3
.

@Nikzea
Copy link
Author

Nikzea commented Aug 8, 2022

SilencedPerson it should be a Problem with the new Godot version because in 3.4 it worked fine and I didn't change anything in the ico file since than.

@akien-mga akien-mga added this to the 3.x milestone Aug 8, 2022
@akien-mga
Copy link
Member

CC @bruvzg

@bruvzg
Copy link
Member

bruvzg commented Aug 8, 2022

Godot do not do anything to the icon, it's only feeding it to the rcedit, so it's probably something with the export template. The only 3.5 change that might be responsible for it is this one - #57850

@bruvzg bruvzg self-assigned this Aug 8, 2022
@Nikzea
Copy link
Author

Nikzea commented Aug 8, 2022

ok, what should I do now?

@Nikzea
Copy link
Author

Nikzea commented Aug 8, 2022

I solved my problem, after exporting to linux and exporting than the windows version to desktop, the icon is now how it should be.
Capture
Thank you all for the help

@SilencedPerson
Copy link

So Godot holds your icon ransom until make a linux export. Good.

@SuzukaDev
Copy link

SuzukaDev commented Sep 4, 2022

I can confirm this bug (3.5 stable), it was driving me crazy D:
(I did everythig as the doc says, my icon had all the sizes, I made it using the imagick command (but also tried GIMP, online generators, etc)). But nothing.
After exploring the .exe in Resource Hacker I saw that it was also pairing wrongly the image and the resolution.

The thing that worked was also reverseing the order of the .ico:
A) In Gimp
res

B) Reverseing the order of sizes in the magick command:
Using this:
magick convert icon.png -define icon:auto-resize=16,32,48,64,128,256 icon.ico

Instead of resize=256,128,64,48,32,16 (as the doc says).

Both things worked correctly, and I also tried the to use the "reversed" icon normally in other folders and shortcuts and they work as expected. Seems like the order is only relevant for Godot when exporting.

@dannygaray60
Copy link

I recently had the same problem. Using godot 3.5.1 stable. As much as I use magisk and the command to clear cache (following everything the documentation says) and the icon still appears blurry.
Captura de pantalla 2022-11-16 213523

Attached .ico file and .exe file
icons.zip

@bruvzg
Copy link
Member

bruvzg commented Nov 17, 2022

I have done some testing and can confirm that it is regression from #57850. It's probably a rcedit bug (it's creating a new icon group when setting the icon, and for some reason the group has reverse order of sizes if the original icon was uncompressed).

@bruvzg
Copy link
Member

bruvzg commented Nov 17, 2022

So the issue is size order, rcedit only set it correctly if new icon have the same order as icon already in the executable.

#57850 icon has it reversed, so only icons with 16,32,48,64,128,256 sizes will work, and with old icon only 256,128,64,48,32,16 was working, it's not directly related to the compression.

@bruvzg
Copy link
Member

bruvzg commented Nov 17, 2022

ICO format is quite simple, so I guess we can preprocess ICOs (and allow generating one from PNG) and correct the size order during export.

@akien-mga akien-mga modified the milestones: 3.x, 4.0, 3.6 Nov 18, 2022
Poobslag added a commit to Poobslag/turbofat that referenced this issue Nov 24, 2022
godotengine/godot#64073

A regression introduced in Godot 3.5 made the Turbo Fat icon blurry.
Following the suggested advice in this thread, I've ignored the Godot
documentation and generated an icon with the *reversed* size order
(16,32,48,64,128,256) which fixes it.

Presumably this will break at some indeterminate point in the future
when the order is reversed again, so that's exciting.
@wlwl2
Copy link

wlwl2 commented Dec 4, 2023

I've submitted two pull requests to resolve this issue in the docs. One for the order reversal and another for some troubleshooting tips after the order is fixed: godotengine/godot-docs#8564.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.