The new icons by yoroy are great! But they are transparent PNGs, so they won't display corectly in IE6 and below. They'll have a grey background instead, which is really not nice. We all hate IE6 but I think its market share will still be high enough when D7 ships to consider it an issue.

So I propose a very simple no-fuss way to improve things for IE6. No hack, no code change, no js madness, and absolutely no difference in other browsers. Just use the converted images I provide instead of the original ones and you're set!

If you want to know more about how it works read on, otherwise you can skip this section :)
The problem is that transparent PNGs are usually 24 bits images with an alpha channel, which IE6 is unable to display correctly.
The solution is to use 8bits PNGs with an alpha channel. When IE6 reads such a file, any pixel with at least 1% transparency is considered totally transparent. So you loose the translucent part but the image is still legible. In our case it means the forum icons will be displayed without anti-aliasing in IE6.
Of course the image is converted to 8 bits (256 colors) instead of 24, so one could argue there is a loss of information. But here it really doesn't matter at all as the icons are in grey levels. As an example, the original forum-closed_4 image uses only 116 colors anyway, so 8 bits is plenty enough.

Here's what the fixed icons looks like on white and colored backgrounds in IE6:
http://elv.free.fr/pub/drupal/forum-png8.png
I'd say it looks a lot better than with the grey background. It could even be improved with a tiny bit of sub-pixel peeping but it's probably not worth it.

If you want to apply the same conversion to other images, as far as I know the only graphic app able to save them in this format is Adobe Fireworks (not Photoshop, not Gimp...). But there are command line utilities that can *convert* them.
The library used here was pngquant (http://www.libpng.org/pub/png/apps/pngquant.html).
Actually for the sake of speed and simplicity I use png8alpha, a Cocoa wrapper for OS X, so I can drag n' drop the PNG files to convert them.

(it seems I can't attach files, there's an issue in the drupal.org upgrade issue queue. So here's a direct link to a zip with all the icons http://elv.free.fr/pub/drupal/forum-icons-png8a.zip)

Comments

jrabeemer’s picture

IE8 was released. IE6 browser share at 19% and falling fast. Is there any consensus on these? Yoroy?

eigentor’s picture

What was the issue with making a patch for just Icon images? I think on the original Icons Thread this needed a concerted effort of several core ninjas to get the icons in... http://drupal.org/node/102743#comment-1226321

I am much in Fávor of elvs Solution, if it does the trick. Though IE6 going down would be nice if Forum looks nice there.

webchick’s picture

I've no problem doing this if we get yoroy's +1.

webchick’s picture

Status: Active » Needs review

Indicating that there's something here that "needs review"

yoroy’s picture

Status: Needs review » Reviewed & tested by the community

Nice. I think I looked into this in the original issue but didn't get good enoug results, I somehow always degraded the display quality in other browsers. This seems to keep everything intact for all non-IE6 browsers. Let's do it then.

NaheemSays’s picture

Could an alternative would be to get an iefix (ie from either pngfix or pngbehave module) file into core which forced the proper transparencies to work?

I would consider it a core infrastructure issue to provide a path to fix ALL pngs instead of just fixing a few of them.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Cool, thanks! Committed to HEAD.

@nbz: We should probably look into that. Want to start another issue if one doesn't already exist?

NaheemSays’s picture

I have posted a comment in #300565-5: Fix PNG transparencies for IE6 (and other compatibility fixes too?) to see if that ball can be got rolling.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

andypost’s picture