Extracted .ico's toolbar icon looks worse than the exe's

Bug reports will be moved here when the described bug has been fixed

Moderators: white, Hacker, petermad, Stefan2

Post Reply
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Extracted .ico's toolbar icon looks worse than the exe's

Post by *avada »

Hi!

I noticed that when I choose the very same icon that I extracted from an exe (via IconsExtract), and use it as the icon file it looks a lot worse than when it's loaded from the exe.

It looks rather aliased, as if it's scaled with an inferior algorithm.

Here's how they look in their original size:

Image: https://abload.de/img/ff-tc-icon-origpfs95.png

And magnified:

Image: https://abload.de/img/ff-tc-icon-3xv0ssc.png
Last edited by avada on 2017-05-31, 12:18 UTC, edited 3 times in total.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

Did you extract the icon with all its possible icon sizes from the exe?

Note that icon resources are not just one image. Icons are a collection of images in different resolutions for different (standard/common) icon sizes.

I would guess you only extracted the icon image for one particular resolution, which so happened wasn't the resolution used by the toolbar. The scaled down icon looking worse would simply be due to the fact that the original icon resource in the exe also has a small image hand-crafted specifically for the small size (and thus of course appearing better than a scaled down larger version of the icon) and which you just forgot to extract...
User avatar
MVV
Power Member
Power Member
Posts: 8702
Joined: 2008-08-03, 12:51 UTC
Location: Russian Federation

Post by *MVV »

I'm using Resource Hacker for such tasks, and it shows pure single-size icons in Icon resource folder and all-size icons in Icon Group resource folder, so I save icons from Icon Group folder in order to get icon file with all available icon sizes.
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

elgonzo wrote:Did you extract the icon with all its possible icon sizes from the exe?

Note that icon resources are not just one image. Icons are a collection of images in different resolutions for different (standard/common) icon sizes.

I would guess you only extracted the icon image for one particular resolution, which so happened wasn't the resolution used by the toolbar. The scaled down icon looking worse would simply be due to the fact that the original icon resource in the exe also has a small image hand-crafted specifically for the small size (and thus of course appearing better than a scaled down larger version of the icon) and which you just forgot to extract...
Hi!

I'm aware of icon files and multiple resolutions. The icon files are extracted in their totality. They show up with all resolutions in my image viewer (imagine). So I don't need to try hard to verify.


If you don't believe me why not try it yourself?

(Note: I have the button bar size set to 24, but it looks noticeable worse from 18-24)
Last edited by avada on 2017-05-31, 11:03 UTC, edited 2 times in total.
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

MVV wrote:I'm using Resource Hacker for such tasks, and it shows pure single-size icons in Icon resource folder and all-size icons in Icon Group resource folder, so I save icons from Icon Group folder in order to get icon file with all available icon sizes.
I didn't use resource hacker. But IconsExtract extracted two files of FF's main icon which are bit identical and both have all the resolutions up to 256*256.

(Actually it extracted exactly the same stuff in the same order as TC shows for the exe when editing a toolbar icon)

So, In conclusion TC has some bug. Either it chooses the an inappropriate size for the bar in this case or a bad algorithm.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

avada wrote:So, In conclusion TC has some bug. Either it chooses the an inappropriate size for the bar in this case or a bad algorithm.
What toolbar size are you using?
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6449
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Post by *Horst.Epp »

I extracted the FF icons with Iconext and its looking fine in TC
with Buttonbar Appearance set to 48
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

elgonzo wrote:
avada wrote:So, In conclusion TC has some bug. Either it chooses the an inappropriate size for the bar in this case or a bad algorithm.
What toolbar size are you using?
Hi!

I mentioned it: 24. But it doesn't look right at sizes 18-24
Horst.Epp wrote:I extracted the FF icons with Iconext and its looking fine in TC
with Buttonbar Appearance set to 48
Hi!

It looks good apart from the size range I mentioned.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Post by *gdpr deleted 6 »

avada wrote:I mentioned it: 24. But it doesn't look right at sizes 18-24
I can confirm the issue. I tested now with a toolbar size of 24 and the icons look indeed different. (Sorry for missing the information in your earlier post.)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

I will check it. You can't use the same Windows functions to load icons from .exe/.dll and from .ico, so this may be causing the difference here.
Author of Total Commander
https://www.ghisler.com
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

ghisler(Author) wrote:I will check it. You can't use the same Windows functions to load icons from .exe/.dll and from .ico, so this may be causing the difference here.
Well, Microsoft screwing up something wouldn't be surprising... :)
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

ghisler(Author) wrote:I will check it. You can't use the same Windows functions to load icons from .exe/.dll and from .ico, so this may be causing the difference here.
So did you look into it? Found anything?
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Please try whether it's better with TC 9.10 beta now!
Author of Total Commander
https://www.ghisler.com
avada
Senior Member
Senior Member
Posts: 217
Joined: 2007-10-05, 06:24 UTC

Post by *avada »

ghisler(Author) wrote:Please try whether it's better with TC 9.10 beta now!
Cool!
I tested it. The ico looks just as good as the exe now.
Image: https://abload.de/img/f56-tc1j1ruv.png

Image: https://abload.de/img/f56-tc2yeoer.png

(Not identical, so I guess the scaling algorithms are different.)
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Post by *ghisler(Author) »

Yes, the algorithms are different, but at least both are smoothly scaled now.
Author of Total Commander
https://www.ghisler.com
Post Reply