Windows notification icons

Thursday 1 December 2005This is almost 19 years old. Be careful.

About once a year, someone at work decides that we need to tweak the icons on the Windows client. This usually involves getting an outside graphic designer to send us images which are unusable because they don’t know what we need for a .ico file. Then a developer munges the images to get the proper transparency, resolutions, and so on, and builds an ico file (@icon sushi is my favorite tool for this).

Then comes the fun of trying yet again to second-guess how Windows is going to choose among the multiple images in the icon. Microsoft technotes notwithstanding, it is not obvious what is going on. In particular, the icon chosen for the notification tray (commonly referred to as the system tray) always looks smudged.

To figure this out, I built a diagnostic icon (rgb.ico). It has three images, 16×16, 32×32, and 48×48. But the three images are designed to look different: they are solid red, solid green, and solid blue respectively. If you look at this file in Windows Explorer, you’ll see a red square in the list view, a green square in the icon view, and a blue square in the tiles view:

Three views of the same rgb.ico file

In the client C# code, I tried setting rgb.ico as the notification icon. Ideally, the red square would display, since it is the 16×16 image. Nope, the green square appears, a perfect 16×16 green square, clearly produced by taking the 32×32 image and scaling it down. No wonder my icons look gross.

I don’t know if this is something about the system tray, or about the .NET NotifyIcon class, or what. But it bugs me. To get the pixels I want I’ll have to create a special 16-only icon for the notification area?

Comments

[gravatar]
Peter Marcantonio 10:53 AM on 1 Dec 2005
Interesting article, do you have a copy of the @icon sushi it seems that their site is no longer up?
[gravatar]
Looks like things moved around, but they're still there: http://www.towofu.net/soft/e-aicon.php
[gravatar]
I can well be wrong but I have a slight feeling that notification 16x16 icon should be limited in color. 8-bit may be.
[gravatar]
Ned, I remember when I was there doing icons... I think for the outlook client... it always used the 32x32 icon and squished it down to 16x16. We ended up just making a 16x16, doubling all the pixels, and then when it got squished it looked right.

I have no idea why Windows likes doing that, but it does.
[gravatar]
Oh, and one more thing... When I made iTuner I tried to make a multi-sized icon like you were doing, but couldn't ever get it to work correctly, so I just made it a 16x16 only, and it worked ok.
[gravatar]
Sorry, last reply, I promise (if I could edit old replies I would just add on to old ones), your icon sushi link it outdated. New one:
http://www.towofu.net/soft/e-aicon.php
[gravatar]
Perfect question for Raymond Chen's blog The Old New Thing. He's on the Windows team. You can post something here to suggest a topic.
[gravatar]
It's been a while since I did that, but I know I used a single image file instead of a multi image file, and it worked just the way it should.

Just say NO to giving Windows options to choose from...

Add a comment:

Ignore this:
Leave this empty:
Name is required. Either email or web are required. Email won't be displayed and I won't spam you. Your web site won't be indexed by search engines.
Don't put anything here:
Leave this empty:
Comment text is Markdown.