Fog Creek Software
Discussion Board




Alpha-Blended Icons In CityDesk

Hi Joel,

Was the comment about spending three days on creating alpha-blended icons for CityDesk a joke? See http://discuss.fogcreek.com/CityDesk/default.asp?cmd=show&ixPost=12159

And did you stop to shave?

John Topley (www.johntopley.com)
Friday, April 30, 2004

In CityDesk you can right click on a file and get a list of registered applications to edit that file with.

Each application appears next to its own icon in the right-click menu.

On XP some of the icons are stored with an alpha channel. If you ignore the alpha channel, some icons appear to have a big ugly black outline around them. If you incorporate the alpha channel, it makes a nice drop shadow effect.

I spent a lot of time (probably not really three days; I think more like one day) making sure that in CityDesk 3.0 when we draw an icon in the right-click menu, we incorporate its alpha information so it appears with a drop shadow, as intended, instead of an ugly black outline.

It probably falls in the category of poor prioritization. Then again, if I ignored too many of these things, CityDesk would start to feel like a Chevy, not a Lexus.

Joel Spolsky
Fog Creek Software
Friday, April 30, 2004

Before and after pictures are at

http://www.joelonsoftware.com/pictures/AlphaBlend.PNG

The left side from CityDesk 2.0 on XP, the right side from CityDesk 3.0 (under construction) on XP.

Joel Spolsky
Fog Creek Software
Friday, April 30, 2004

As it turns out, the PNGs I used on my web site that make use of the alpha channel look like crap in Internet Explorer for this very reason.  There's nothing I can do about it though, except wait for Microsoft to properly support them, and advise people to use Mozilla until then.

Mike
Friday, April 30, 2004

Ach, there's nothing wrong with taking a bit of time out from doing all the hardcore complex software engineering tasks to have a bit of fun with icons! ;-)

John C (www.johnsadventures.com)
Friday, April 30, 2004

Thanks Joel.

This actually explains a bug that I never got to the bottom of with an open-source project that I was heavily involved with two years ago!

John Topley (www.johntopley.com)
Friday, April 30, 2004

Actually Mike, you can fix it in IE 5.5 and 6.0 by including the JavaScript from here:  http://homepage.ntlworld.com/bobosola

r1ch
Friday, April 30, 2004

Can you honestly say that work was worthy of your God-like status? I mean, wouldn't it have been better to delegate that to one of your peons?

Anon-y-mous Cow-ard
Saturday, May 01, 2004

Dell loves people like Mike!

"Hey, I'm sorry my program runs like crap on your machine - you should probably buy a dual processor box with 4GB of RAM..."

Philo

Philo
Saturday, May 01, 2004

What is Philo smoking!? Philo, the PNG format is a W3C supported standard. Proper use of the PNG format that exposes Microsoft's spotty support of the standard in IE is not the same as bad programming. Also, encouraging users to use a free browser that supports standards is not the same as attempting to sell new product as a solution to bad programming.

Colin Scroggins
Saturday, May 01, 2004

Ah, heck - I was gonna draft some self-righteous indignation about it, but my heart's not in it - I wish IE supported PNG properly as well.

My point with the post was about the Mozilla comment, which hearkens back to the days of "this page viewed best on my system" type pages. But on further consideration, I really can't make that argument about PNG.

So I take it back. :-)

Philo

Philo
Saturday, May 01, 2004

On the IE PNG issue...
Wouldn't it be better to just mix your nice alpha-blended PNG with a backround layer of the color of your web page background, drop the alpha-blended idealism, and step off your standards soapbox?  The moon doesn't hear your howling, nor does the corporate web standard-defining body we call Microsoft.

practically speaking
Saturday, May 01, 2004

Practical, sometmes that's not a choice. If you want a bcakground with a pattern and a dynamically resizing/moving foreground when you resize your window (where the foreground is surronded by some image using an alpha-channel) its like hell getting it to work with gif.

Coward!
Saturday, May 01, 2004

I've asked this before, but why does everyone refer to w3c recommendations as standards?

For example:

PNG (Portable Network Graphics) Specification
Version 1.0
W3C Recommendation 01-October-1996

http://www.w3.org/TR/REC-png.html

Matthew Lock
Saturday, May 01, 2004

Hey Joel, that Textpad icon looks weird, like the colours have become inverted. Normally it looks like http://www.p-i-s.com/images-2/icon-textpad.gif

While you are fixing that take the trash out with the lint.

Matthew Lock
Saturday, May 01, 2004

"I've asked this before, but why does everyone refer to w3c recommendations as standards?"

Because W3C is the Security Counsil of the internet so to speak (though it's only for webpages).

Peter Monsson
Sunday, May 02, 2004

http://www.w3.org/2003/06/Process-20030618/tr#RecsW3C
"W3C Recommendations are similar to the standards published by other organizations."

Different words, same effect.

scruffie
Sunday, May 02, 2004

Matthew, Joel is using one of the alternative icons from inside textpad.exe as his TextPad icon.

Michael Josephson
Sunday, May 02, 2004

Joel,

Truthfully, I probably would have never the noticed the difference in the "bad" icons.

David Burch
Sunday, May 02, 2004

"Truthfully, I probably would have never the noticed the difference in the "bad" icons."

I would have ;^)

Steve Jones (UK)
Monday, May 03, 2004

To those who complained about my web page... I allow the viewer to select a background color dynamically with javascript, because I thought that would be cool.  The choice is made by selecting one of 6 little boxes in the bottom corner of the page, and those boxes use the alpha channel to blend to whatever background they're being displayed on.  There is no way to accomplish this by just blending in the 'background color' of my page, because the background is dynamic. 

Besides that I think this is a hack.  I refuse to make my images have a "hard coded" background color because one day I may change my page background and I'm sure as hell not editing 50 images to try to alter their background color.  Especially when this is impossible to do cleanly in many cases.  The need for an alpha channel is clear and it's really time Microsoft supported it properly in their browser.  (I'm not some anti-MS zealot, I just want my web page to look nice.)

To the person who posted the Javascript workaround, thank you, I'll be checking that out shortly!

Mike

Mike
Monday, May 03, 2004

At least we got some info about CD3.

So much for icons. What other goodies are you working on?

Bob Bloom
Monday, May 03, 2004

MS Outlook on XP has the exact same black-bordered (bad) icons when you attach a notepad file.

Just me, or did they not fix this themselves?

Colm Larkin
Tuesday, May 04, 2004

I wonder why it was so hard to support. Since icons are a standard part of the GUI, shouldn't there be a system API that would render them for you?

Nate Silva
Tuesday, May 04, 2004

When the API was designed (pre Win95), there was no such thing as Alpha-Blended icons - its new to XP. For this reason, reverse compatability means that icons are painted without alpha blending if you just use the obvious functions directly.

Neil Mitchell
Tuesday, May 04, 2004

*  Recent Topics

*  Fog Creek Home