Netscraps

A windsurfing, CSS-grudging, IE-hating, web-developing, gigantic-machine-puzzling blog

IE6/IE7 PNG gAMA bug makes PNGs appear darker

IE PNG gAMA bug
The link PNGs appear darker, except for Email A Friend, which has the gAMA chunk removed.

In setting up the new vehicle details page for DDC, I noticed that the background color for the 24-bit PNGs did not match the css background color, but only in IE6.

Searching online, I found this is a known bug with IE that stems from a flawed interpretation of the PNG’s gAMA setting. It’s fantastic that the IE team added PNG alpha transparency to IE7, but apparently they kept the gAMA bug in IE7 to make sure browser compatibility specialists keep their jobs for years to come.

In short, the fix is to remove the gAMA chunk using a tool such as TweakPNG or Pngcrush — I used TweakPNG (freeware, super easy to use, no installer) which worked great for fixing one image at a time. Fun stuff.

Previous

Abkazia refugees, Zugdidi, Georgia

Next

My day job, as represented by a pie chart

4 Comments

  1. Daniel

    Ahhh it worked! You’re the man!

  2. Is there any way to do this server side with Image Magick?

  3. Kick ass. I love PNG, but the color differences were a complete eyesore.

    Thanks for doing the research for us. Those are great finds, thanks a ton.

    Rawk on.

  4. Rob

    Saved our bacon. We were looking at having to go back to a client after they had approved a design to say that we were not able to implement it reliably. This article, and those tools saved us!!

Leave a Reply

Your email address will not be published. Required fields are marked *

Powered by WordPress & Theme by Anders Norén