Problems with IE and PNG

There are two classes of problems with PNG support in IE prior to version 7.

The first is that transparency support is bad. You can fix this with a well known javascript hack from homepage.ntlworld.com/bobosola/pngfix.js.

The second is that if one PNG is bad or has an inccorect format then the entire IE renering engine fails to display even a single PNG, including good ones. So if you have 999 PNGs and one is bad or corrupted, then zero display. Great code eh? The fix here is the handy UNIX file tool:

$ file *.png |grep -v PNG
foundit.png: data

In this case the foundit.png file is the guilty one - it's standard data, rather than a well formed PNG file. Destroy and watch things work!


Hosted at pratyeka.