Closed Bug 1464966 Opened 6 years ago Closed 6 years ago

Wrong resolution order in Thunderbird Windows icon - 24-bit version comes before the 32-bit one

Categories

(Thunderbird :: Theme, defect)

x86
Windows 10
defect
Not set
trivial

Tracking

(thunderbird_esr60 fixed, thunderbird60 fixed, thunderbird61 wontfix, thunderbird62 fixed)

RESOLVED FIXED
Thunderbird 62.0
Tracking Status
thunderbird_esr60 --- fixed
thunderbird60 --- fixed
thunderbird61 --- wontfix
thunderbird62 --- fixed

People

(Reporter: lrn1986, Assigned: Paenglab)

Details

Attachments

(2 files, 1 obsolete file)

32x32 and 48x48 icons look bad against dark background, as if they are missing an alpha channel. They are. I've extracted the icon file from thunderbird.exe and discovered that the order in which different subimages are specified is likely wrong. In this file 24-bit 48x48 icon comes *before* 32-bit alpha-transparent 48x48 icon. Same goes for 32x32. Note that Windows chooses the first icon that is not bigger than the size it needs (which is why icons should be ordered from biggest to smallest), but does not seem to take color format into account, therefore choosing the first 32x32 or 48x48 icon (depending on its needs), the one that has 24-bit color format and lacks alpha-transparency, even though there's a better icon in 32-bit format and the same size just after that.

I would advise to try to modify the icon file, reordering icons to make sure that 32-bit version of an image with a particular resolution comes *before* the 24-bit version of the image with the same resolution, and the 24-bit version comes directly after.
Component: Untriaged → Theme
Which beta version is this? We tweaked the icons again in TB 60 beta 8.
60b6, i think.

As for 60b8, the icon is changed indeed. Now the 32x32 version of the image has alpha value for transparent regions set to 30, so TB icon now has semi-transparent square edges on my taskbar and in the explorer file list (the places where 32x32 icon is used).
So can you please summarise the defects you're seeing in TB 60 beta 8. Is the order still wrong? Is the alpha value of 30 undesirable?

Richard, did we pay attention to order and alpha? Since we're doing another beta, we can tweak the icons again.
Flags: needinfo?(richard.marti)
Attached image TB icon with alpha=30
The order is not wrong - the icon now simply lacks any 24-bit images completely. It's probably for the better (unless you're worried about XP compatibility or something...I have no idea if any software still uses 24-bit icons these days).

The alpha value of 30 is undesirable, because the alpha value of completely transparent pixels should be 0, not 30. See the attached image - all instances of the TB icon on that image have square semi-transparent borders (more obvious on the taskbar, less obvious on the window preview, since the semi-transparent part would have been white, if it had high alpha value, so it brightens anything it overlays, thus being less visible on top of bright background).
OK, thanks, we'll do another iteration on this one and fix the alpha.
Actually, let me correct myself a bit. The color of the area that should be transparent is *not* white, nor is it constant.
AFAICS, the color is a shade of roughly (123;101;50) (i.e. brown-ish), and it changes a bit between pixels. The alpha value is also not constant 30, but changes from nearly 37 next to the bird down to 30 at the edge.
Attached patch Bug1464966.patch (obsolete) — Splinter Review
The alpha is for me always 0% all the time. I don't know from where this 30% come. I don't see this on my desktop with 60 beta.

This patch only changes the sort order in the hope this helps. Maybe the scaling did some weird things with converting transparent pixels to less transparent pixels on LRN's desktop.
Assignee: nobody → richard.marti
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Flags: needinfo?(richard.marti)
Attachment #8987558 - Flags: review?(jorgk)
Wait, why would you need this patch NOW, when TB icon in 60b8 does not *have* 24-bit images anymore? They are simply not there. There's nothing to sort. 

As for your statements about the alpha being 0% all the time, i disagree. To reproduce:
* Install TB 60b8 somewhere (the 32-bit version, since there's no 64-bit one)
* Use 7Zip (or other compatible archive manager) to open thunderbird.exe as an archive
* Extract the .rsrc\ICON data subdirectory
* Drop the 3.ico file onto GIMP
* Colors->Components->Decompose into RGBA (for some reason i've failed to quickly find how to view/change the alpha of a drawing color - it looks like GIMP doesn't consider alpha to be part of the color at all)
* Look at the alpha layer, use the color picker to pick any of the black-ish values along the edges

The color picker would say that the color is roughly 30, whereas it should be 0.
Attached patch Bug1464966.patchSplinter Review
Okay, the 32px icon got somehow the reduced transparency -> fixed, also in the ICO file.
Attachment #8987558 - Attachment is obsolete: true
Attachment #8987558 - Flags: review?(jorgk)
Attachment #8987589 - Flags: review?(jorgk)
Comment on attachment 8987589 [details] [diff] [review]
Bug1464966.patch

Looks fine to me. Note that the order doesn't matter:
https://msdn.microsoft.com/en-us/library/ms997538.aspx?f=255&MSPPError=-2147217396, quote:

Which Image?
Once an RT_GROUP_ICON is chosen, the individual icon image, or RT_ICON resource, must be selected and extracted. Again, if there exists only one RT_ICON resource for the group in question, the choice is trivial. However, if multiple images are present in the group, the following selection rules are applied:

1. The image closest in size to the requested size is chosen.
After that there are many colour depth considerations.
Attachment #8987589 - Flags: review?(jorgk) → review+
Pushed by mozilla@jorgk.com:
https://hg.mozilla.org/comm-central/rev/1f00110035a0
Fix the 32px icon and change the sort order (resolution) in the ICO file. r=jorgk DONTBUILD
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 62.0
Comment on attachment 8987589 [details] [diff] [review]
Bug1464966.patch

[Triage Comment]
Attachment #8987589 - Flags: approval-comm-esr60+
Attachment #8987589 - Flags: approval-comm-beta+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: