Solution (Pseudo Bug)
Date of the Solution
Sun Aug 9 07:22:32 2009
All of the affected
When I've said that this is a feature and not a bug, what I meant is that IE supports "PNG Gamma profiles". I've found a page that seems to talk about the topic: The Sad Story of PNG Gamma "Correction" by Henri Sivonen. The solution for our bug is simply removing those gamma profiles from your PNG images. Let's glance at the fixed demo:
Due to the nature of the bug, fixed demo is available on a separate page
- HTML Code:
- CSS Code:
background: #74822D url(pngcrush_fixed.png) no-repeat center;
Our code stayed the same. What I did is "fix" the image using pngcrush program. At this point I'd like to point out that you can configure your editor to NOT save those gamma profiles in the first place. The editor that's being naughty and saves them by default seems to be Photoshop; I'm a happy Gimp user and I don't have problems with my PNGs, this also means that I cannot give you info on how to configure Photoshop to not to save those profiles.
Anyhow, pngcrush can also reduce the size of your images, so why not give it a go. The command I've used to "fix" the demo image is: pngcrush -brute_force -rem gAMA -rem cHRM -rem sRGB -rem iCCP pngcrush.png pngcrush_fixed.png. The explanation of the program's arguments is beyond the scope of this document - as always, RTFM
On Ubuntu pngcrush is available from the Universe repos: sudo apt-get install pngcrush.