TclApp not wrapping 256 x 256 icon files

Posted by trifield on 2012-02-24 15:22
Forums: TDK support | OS: Windows XP Pro

My current setup is ActiveTcl and ActiveTclDevKit 5.3.0 on a Windows XP machine (I've tested this on a Windows 7 64-bit machine with the same results).

When packing custom icons using TclApp and the provided basekit (base-tk8.5-thread-win32-ix86.exe) I have no problems packing all icons EXCEPT the 256 x 256/32 bpp icon. The tooltip on the "Basic" screen tab says that the basekit does indeed contain this icon but will say "missing" when I add it to the custom icon file. I've quadruple checked the icon size to ensure it conforms to 256x256/32bpp.

What's even more intriguing is the tooltip (and wrapping output) confuses the 256 x 256/32 bpp icon that I've added as a 0 x 0/32 bpp icon. I've tested this by removing the 256 pixel icon and the entry goes away. This suggests to me that a variable somewhere is not long enough to properly contain the image size but I can't find a workaround.

TclApp Run output:

Inserting custom -icon C:/Documents and Settings/Josh/Desktop/Program Icons/exe_icons/more icons/exe_icons/exe_icons_6.ico
    [__] 0x0/32bpp: ignored, missing in prefix
    [02] 128x128/32bpp: replaced
    [03] 64x64/32bpp: replaced
    [04] 48x48/32bpp: replaced
    [05] 32x32/32bpp: replaced
    [06] 24x24/32bpp: replaced
    [07] 16x16/32bpp: replaced
    [__] 256x256/32bpp: not replaced, missing in custom icon

I can't seem to find anybody who has reported a similar problem which strikes me as odd. Any thoughts on a cause, fix, or even a workaround? Is this a bug or did I make a mistake in setup?

Thanks for any help,
Josh @ Trifield

ActiveState Staff
Mon, 2012-02-27 12:30

Problems with 256x256 icons have been reported to us, see

It is a bug in TclApp.

At this point it is not clear if that is actually fixable.
The main bug is likely that we are not detecting it properly.
The other issue which then may prevent a fix is that the 256x256 icons seem to be stored in PNG format, compressed. Which means that they are of varying length.

That is bad, because TclApp's mechanism to replace the icon in the application with yours assumes that icons of a specific dimension and bit depth have the same size, allowing to directly overwrite them in the executable without having to do anything else. For 256x256 this will not be true anymore.

trifield | Mon, 2012-02-27 14:22

Thanks for your response. I did not find the bug report in my initial research. Now that I see it I understand.

One last question then: Is there a way to suppress the 256 icon already embedded in the basekit so that Windows is forced to use the 128 bit icon? It's frustrating that my exe icon changes based solely on the view type used by Windows. Obviously this is not a BIG problem but if you have any thoughts I'd appreciate them.


petasis | Sun, 2012-04-29 13:03

I have tried both a PNG (compressed) and a BMP (uncompressed) 256x256/32 icon. It does not get recognised. In addition, if my icon file contains other colour depths, it seems that the lower colour depths are selected. I have to remove everything and leave only the 32 bit ones...