(Solved) Wrong size of associated icon loaded

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

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

(Solved) Wrong size of associated icon loaded

Post by *Sob »

TC 10.00ß1a (both 32/64 bit), icons in file list use default 16x16 size, but TC loads larger associated icon from ico/dll/exe:

Image: http://web.hisoftware.cz/sob/tc/tc1000b1a-associated-icon-bug.png

In this example, extension ".testicon" is associated to notepad.exe and sample icon (http://web.hisoftware.cz/sob/tc/testicon.ico) is set for it. Icon file contains several variants of size and color depth, where all 16x16 look the same and all larger ones look different. Old TCs correctly load 16x16 variant for both .ico and .testicon. Current beta loads 16x16 for .ico, but something larger for .testicon.
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Wrong size of associated icon loaded

Post by *ghisler(Author) »

How is the icon defined, via Windows association or via TC internal association?
Author of Total Commander
https://www.ghisler.com
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Re: Wrong size of associated icon loaded

Post by *Sob »

It's standard Windows system-wide association.

I did use TC to create it, because I don't know if that's even possible to do using Win10's terrible UI, but it doesn't make a difference. Using own extension was only a test after I noticed that icons for many other types look more or less different after installing beta TC.

And original test was with Windows 10, but same happens also with Windows 7.
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Wrong size of associated icon loaded

Post by *Usher »

Sob wrote: 2021-03-12, 16:31 UTCAnd original test was with Windows 10, but same happens also with Windows 7.
The same happens in Windows XP. TC doesn't use 16x16 associated icons in file lists.
Andrzej P. Wozniak
Polish subforum moderator
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Wrong size of associated icon loaded

Post by *ghisler(Author) »

Several people have reported this problem, but here it all works fine. I will make a code comparison, maybe I find some changes which could cause this in some cases.
Author of Total Commander
https://www.ghisler.com
User avatar
Usher
Power Member
Power Member
Posts: 1675
Joined: 2011-03-11, 10:11 UTC

Re: Wrong size of associated icon loaded

Post by *Usher »

2ghisler(Author)
To be honest, some icons look better. Maybe you should add separate option to choose icon used, it should be something like:
"Icon displayed size" [16x16] and "Icon selected size" [32x32]
Andrzej P. Wozniak
Polish subforum moderator
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Re: Wrong size of associated icon loaded

Post by *Sob »

Update: It's even more complicated, it depends on the source of associated icon (ico or exe).

In fact, not even older TC does it completely correctly:

Code: Select all

size      10.00b1a         9.51
        file   assoc     file   assoc
      ico exe ico exe  ico exe ico exe
16    16  16  32  32   16  16  16  16
24    32  32  32  24   32  32  32  24
32    32  32  32  32   32  32  32  32
48    48  48  32  48   48  48  32  48
64    48  48  32  64   48  48  32  64
size = configured size
file/ico = size loaded from .ico file (when .ico is shown in list)
file/exe = size loaded from .exe file
assoc/ico = size loaded from associated icon when it's .ico
assoc/exe = size loaded from associated icon when it's .exe

But I guess some of it may perhaps be some Windows limitation, because I see Explorer using only 16, 32 or 48 (never 24 or 64).

Here's better icon for testing, with all combinations of sizes (16/24/32/48/64) and color depths (32/24/8/4), where images have texts showing size and color depth: http://web.hisoftware.cz/sob/tc/testicon2.ico
l0o
Junior Member
Junior Member
Posts: 4
Joined: 2019-12-03, 12:45 UTC

Re: Wrong size of associated icon loaded

Post by *l0o »

Glad I found this thread...
In W7 icons looks different in 10.00b1a and for sure not better. :/ I use typical (I guess) 16x16.
(E.g. Irfanview's icos from icon plugin, pdfs icons, notepad 2 icons etc)
In 9.51 all was perfect.
gdpr deleted 6
Power Member
Power Member
Posts: 872
Joined: 2013-09-04, 14:07 UTC

Re: Wrong size of associated icon loaded

Post by *gdpr deleted 6 »

2Sob
thanks for putting the effort into trying this out. Hopefully this helps in finding the root cause of the issue.
(Those smudged icons in TC10 really don't look nice... :()
User avatar
ghisler(Author)
Site Admin
Site Admin
Posts: 48021
Joined: 2003-02-04, 09:46 UTC
Location: Switzerland
Contact:

Re: Wrong size of associated icon loaded

Post by *ghisler(Author) »

I found the reason in the meantime. I tried to forbid dangerous paths like $MFT which can crash the system, but instead disallowed all paths except for these in 2 icon functions...
Author of Total Commander
https://www.ghisler.com
User avatar
Samuel
Power Member
Power Member
Posts: 1929
Joined: 2003-08-29, 15:44 UTC
Location: Germany, Brandenburg an der Havel
Contact:

Re: Wrong size of associated icon loaded

Post by *Samuel »

Have the same problem - looking forward for b2a.
Plague
Junior Member
Junior Member
Posts: 6
Joined: 2021-03-17, 13:06 UTC

Re: Wrong size of associated icon loaded

Post by *Plague »

Same Problem (w7x64 +Tested on w10x64) :(
Left - 9.51/ Right - 10b1a
Image: http://ipic.su/img/img7/fs/Explorer-Icons.1615474813.png

Go back to 9.51
Windows/Total Commander user since 1995
Plague
Junior Member
Junior Member
Posts: 6
Joined: 2021-03-17, 13:06 UTC

Re: Wrong size of associated icon loaded

Post by *Plague »

Hooray!
Looks fine in 10b2 (w7x64 1920x1080).
Big Thanks! :)
Windows/Total Commander user since 1995
User avatar
Flint
Power Member
Power Member
Posts: 3487
Joined: 2003-10-27, 09:25 UTC
Location: Antalya, Turkey
Contact:

Re: Wrong size of associated icon loaded

Post by *Flint »

Confirm fixed in b2.
Flint's Homepage: Full TC Russification Package, VirtualDisk, NTFS Links, NoClose Replacer, and other stuff!
 
Using TC 10.52 / Win10 x64
Sob
Power Member
Power Member
Posts: 941
Joined: 2005-01-19, 17:33 UTC

Re: (Solved) Wrong size of associated icon loaded

Post by *Sob »

Confirmed, behaviour from 9.51 is back. It's still not completely correct (see my previous post), but if nobody had problem with that, I don't either, as I only use 16x16 icons in file list.
Post Reply