flat assembler
Message board for the users of flat assembler.
Index
> Windows > Win7 downgrades icon quality. What to do? |
Author |
|
AsmGuru62 21 Dec 2011, 17:28
One solution is:
LoadImage + DrawIconEx. (instead of using resources) |
|||
21 Dec 2011, 17:28 |
|
rohagymeg 21 Dec 2011, 17:34
Do you mean the FASM resource handler is broken or not finished? Thanks for the help, I will try it. But I don't undertand resources at all. Gonna read up on that function.
|
|||
21 Dec 2011, 17:34 |
|
AsmGuru62 21 Dec 2011, 17:54
I believe, the issue is not in FASM - I had the same issues with C code. I had an icon with nice color depth and proper size, like 48x48, but the standard LoadIcon/DrawIcon pair was showing the 16 colors only at 32x32. The better way is to put images into some folder beside youe EXE file and load them on demand. This way youe EXE size will exactly reflect how much code you have written! Otherwise, resources make your EXE fatter.
|
|||
21 Dec 2011, 17:54 |
|
revolution 21 Dec 2011, 18:13
You can store multiple resolutions of icons on the resources. You have to format the resources correctly though. By doing this you can allow programs like explorer to display high quality icons on the desktop. If you keep icons in separate files then you cannot support high quality icons for external programs to display your app (not to mention the headache of having to deal with multiple files during installation).
|
|||
21 Dec 2011, 18:13 |
|
JohnFound 21 Dec 2011, 19:07
Use .res file instead of resource macros. ResHack is your friend here. The last time I checked FASM resource macros was unable to load icons properly.
|
|||
21 Dec 2011, 19:07 |
|
rohagymeg 21 Dec 2011, 19:12
It may be true JohnFound, but funnily the error I experimented is probably because of a bug in win7. In the taskbar it doesn't show the actual icon, but an older one. Will ccleaner solve this? EDIT: Yes, it solved it. The actual good quality icon was there and everything was good with the exe, but first time when I compiled and ran the exe win7 decided to cache it forever
It's called "Tray Notifications Cache" |
|||
21 Dec 2011, 19:12 |
|
JohnFound 21 Dec 2011, 21:29
The .ico file may contain several icons with different resolutions and colors. Then Windows chooses one depending on its needs - for example 16x16 for small icons and details view and 32x32 for desktop view.
When there is only one image (even with good quality) Windows scales it to fit needed parameters. The result is poor in the most cases. |
|||
21 Dec 2011, 21:29 |
|
< Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.