Icon not visible in tabs #12542

Closed
opened 2026-01-31 03:18:21 +00:00 by claunia · 16 comments
Owner

Originally created by @Oldes on GitHub (Feb 12, 2021).

Environment

Windows build number: Microsoft Windows [Version 10.0.19041.746]
Windows Terminal version (if applicable): 1.5.10411.0

Steps to reproduce

Icon file which consist only of PNGs (but is visible normally) is not displayed in tab
https://raw.githubusercontent.com/Oldes/Rebol3/master/make/r3.ico

Expected behavior

Any icon which can be used on OS will be visible.

Actual behavior

Icon is not visible.
image

(And yes... I have the file in %LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\)
image

Originally created by @Oldes on GitHub (Feb 12, 2021). # Environment ```none Windows build number: Microsoft Windows [Version 10.0.19041.746] Windows Terminal version (if applicable): 1.5.10411.0 ``` # Steps to reproduce Icon file which consist only of PNGs (but is visible normally) is not displayed in _tab_ https://raw.githubusercontent.com/Oldes/Rebol3/master/make/r3.ico # Expected behavior Any icon which can be used on OS will be visible. # Actual behavior Icon is not visible. ![image](https://user-images.githubusercontent.com/454805/107799573-dce03780-6d5d-11eb-8e84-62429e76cd1f.png) (And yes... I have the file in `%LOCALAPPDATA%\Packages\Microsoft.WindowsTerminal_8wekyb3d8bbwe\LocalState\`) ![image](https://user-images.githubusercontent.com/454805/107803205-94774880-6d62-11eb-95c1-327ac6ea7248.png)
claunia added the Resolution-ExternalNeeds-Tag-Fix labels 2026-01-31 03:18:21 +00:00
Author
Owner

@zadjii-msft commented on GitHub (Feb 12, 2021):

Does this icon work when the ico is at some other path, and you don't use the ms-appdata:// URI scheme? Like if you just put the file at C:\r3.ico, does it work?

@zadjii-msft commented on GitHub (Feb 12, 2021): Does this icon work when the ico is at some other path, and you don't use the `ms-appdata://` URI scheme? Like if you just put the file at `C:\r3.ico`, does it work?
Author
Owner

@Oldes commented on GitHub (Feb 12, 2021):

Btw... when thinking about it.. is there any serious reason why PNG or BMP could not be used (with some size limits)? It would be more user friendly... and we have year 2021 now.. so we should not depend on tech from year 1985.

@Oldes commented on GitHub (Feb 12, 2021): Btw... when thinking about it.. is there any serious reason why PNG or BMP could not be used (with some size limits)? It would be more user friendly... and we have year 2021 now.. so we should not depend on tech from year 1985.
Author
Owner

@DHowett commented on GitHub (Feb 12, 2021):

BMP ... 2021

🤣

But they.. can? Icons in Terminal can be practically any raster format. Have you tried PNG/BMP and found it to be lacking?

@DHowett commented on GitHub (Feb 12, 2021): BMP ... 2021 🤣 But they.. can? Icons in Terminal can be practically any raster format. Have you tried PNG/BMP and found it to be lacking?
Author
Owner

@Oldes commented on GitHub (Feb 12, 2021):

@zadjii-msft no.. it does not work anywhere... I can use for example this one: https://raw.githubusercontent.com/red/red/master/tests/red-3D.ico

@Oldes commented on GitHub (Feb 12, 2021): @zadjii-msft no.. it does not work anywhere... I can use for example this one: https://raw.githubusercontent.com/red/red/master/tests/red-3D.ico
Author
Owner

@zadjii-msft commented on GitHub (Feb 12, 2021):

fyi, you can just use any old image file:
image

@zadjii-msft commented on GitHub (Feb 12, 2021): fyi, you can just use any old image file: ![image](https://user-images.githubusercontent.com/18356694/107804982-4d6d6100-6d2a-11eb-9ac4-ee60be27b40e.png)
Author
Owner

@Oldes commented on GitHub (Feb 12, 2021):

@DHowett ah... I see... when I use:
https://raw.githubusercontent.com/Oldes/Rebol3/master/make/icon/r3_48.png
than it's ok.

@Oldes commented on GitHub (Feb 12, 2021): @DHowett ah... I see... when I use: https://raw.githubusercontent.com/Oldes/Rebol3/master/make/icon/r3_48.png than it's ok.
Author
Owner

@Oldes commented on GitHub (Feb 12, 2021):

Even PNG of size 256x256 is visible.. so don't know why not the ICO file, because the ICO is made from these PNGs:)

@Oldes commented on GitHub (Feb 12, 2021): Even PNG of size 256x256 is visible.. so don't know why not the ICO file, because the ICO is made from these PNGs:)
Author
Owner

@DHowett commented on GitHub (Feb 12, 2021):

Just FYI: I ran @jtippet's IcoNag (from the IcoTools suite) on your icon and got the following warnings:

r3.ico(1): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette
r3.ico(2): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette
r3.ico(3): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette
r3.ico(4): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette
r3.ico(5): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette

What you have there does not appear to be a valid ico file.

@DHowett commented on GitHub (Feb 12, 2021): Just FYI: I ran @jtippet's IcoNag (from the [IcoTools suite](https://github.com/jtippet/IcoTools)) on your icon and got the following warnings: ``` r3.ico(1): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette r3.ico(2): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette r3.ico(3): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette r3.ico(4): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette r3.ico(5): Warning ICO241: ICO files require the embedded PNG image to be encoded in RGBA32 format; this is Palette ``` What you have there does not appear to be a valid `ico` file.
Author
Owner

@DHowett commented on GitHub (Feb 12, 2021):

Here's the documentation page for the ICO241 warning.

@DHowett commented on GitHub (Feb 12, 2021): Here's the [documentation page for the ICO241 warning](https://github.com/jtippet/IcoTools/wiki/ICO241).
Author
Owner

@Oldes commented on GitHub (Feb 12, 2021):

It's ICO file with PNGs optimized using PNGQuant utility... and so far the ICO file was visible everywhere... but deal with the issue as you like... I'm fine with PNG file as an ico.

Btw... I wonder why I should specify the icon file manually... it should be resolved from the EXE if not defined by user in settings, shouldn't it?

@Oldes commented on GitHub (Feb 12, 2021): It's ICO file with PNGs optimized using PNGQuant utility... and so far the ICO file was visible everywhere... but deal with the issue as you like... I'm fine with PNG file as an ico. Btw... I wonder why I should specify the icon file manually... it should be resolved from the EXE if not defined by user in settings, shouldn't it?
Author
Owner

@jtippet commented on GitHub (Feb 12, 2021):

so far the ICO file were visible everywhere

It might help to know that Windows has 2 icon codecs: one in user32 and one in WIC. A lot of the classic win32 APIs boil down to user32 (LoadIcon, etc), but I believe that the shiny new XAML platform uses WIC. user32 will accept pretty much any valid PNG, but WIC strictly requires GUID_WICPixelFormat32bppBGRA.

So an icon that illegally uses a non-RGBA32 PNG will appear to work just fine in any user32-based GUI (like File Explorer), but will fail in a GUI that uses WIC (like, apparently, this part of the Terminal app).

@jtippet commented on GitHub (Feb 12, 2021): > so far the ICO file were visible everywhere It might help to know that Windows has 2 icon codecs: one in user32 and one in WIC. A lot of the classic win32 APIs boil down to user32 (`LoadIcon`, etc), but I believe that the shiny new XAML platform uses WIC. user32 will accept pretty much any valid PNG, but WIC strictly requires `GUID_WICPixelFormat32bppBGRA`. So an icon that illegally uses a non-RGBA32 PNG will appear to work just fine in any user32-based GUI (like File Explorer), but will fail in a GUI that uses WIC (like, apparently, this part of the Terminal app).
Author
Owner

@DHowett commented on GitHub (Feb 12, 2021):

resolved from the EXE

That'll be part of #1504.

@DHowett commented on GitHub (Feb 12, 2021): > resolved from the EXE That'll be part of #1504.
Author
Owner

@zadjii-msft commented on GitHub (Feb 12, 2021):

There's #705 (and maybe one other issue) tracking that request actually. It'd be a neat feature, if someone could figure out how to reliably get the ico from an exe from an arbitrary commandline ☺️

@zadjii-msft commented on GitHub (Feb 12, 2021): There's #705 (and maybe one other issue) tracking that request actually. It'd be a neat feature, if someone could figure out how to reliably get the ico from an exe from an arbitrary commandline ☺️
Author
Owner

@Oldes commented on GitHub (Feb 12, 2021):

@jtippet ok... thanks for explanation... I thought that main reason to use crunched PNGs in ICO file is to reduce its size.
I will try to include one valid RGBA32 version in it... with a hope that it will be chosen in such a cases.

@Oldes commented on GitHub (Feb 12, 2021): @jtippet ok... thanks for explanation... I thought that main reason to use crunched PNGs in ICO file is to reduce its size. I will try to include one _valid_ RGBA32 version in it... with a hope that it will be chosen in such a cases.
Author
Owner

@Oldes commented on GitHub (Feb 12, 2021):

Btw... isn't it ironic, that much older user32 codec is able to decode such an ico file, while modern WIC cannot simple palleted PNG? ;-)

@Oldes commented on GitHub (Feb 12, 2021): Btw... isn't it ironic, that much older `user32` codec is able to decode such an ico file, while modern `WIC` cannot simple palleted PNG? ;-)
Author
Owner

@DHowett commented on GitHub (Feb 12, 2021):

Based on your assertion that your png file works, it's not that WIC can't do it. It's that WIC refuses to load an out-of-compliance ICO file. That seems to be the right choice for the preservation of a format's integrity. 😄

@DHowett commented on GitHub (Feb 12, 2021): Based on your assertion that your png file works, it's not that WIC can't do it. It's that WIC refuses to load an out-of-compliance ICO file. That seems to be the _right_ choice for the preservation of a format's integrity. :smile:
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/terminal#12542