Remove the gamma (gAMA) chunk from a PNG image to fix darker colors in IE

With the release of IE 7, the consistent use of PNG for Web sites and Web applications moved closer to a reality. However, while recently experimenting with a few concepts that rely heavily on PNG, I discovered IE interprets the gamma (gAMA) data chunk contained within a PNG differently than other browsers. The image will render darker, which can be problematic if you need a GIF or JPG to match the color profile of a PNG.

The W3C specification pinpoints the gamma and chromaticity data associated with a PNG as the primary advantage of this format, since it is a mechanism for more accurately managing colors across different platforms. Yet, it is the PNG alpha transparency that gives Web developers an opportunity to extend the design pallet. Unfortunately, in order to take advantage of one, it is necessary to compromise the other, and therefore, the gamma data should be removed.

TweakPNG is an amazing program for accomplishing this task. It is available under the GNU GPL, and is free to use. You can download it by clicking here. According to the Web site, the program has not been updated for a few years, but it works on Windows 95, 98, ME, 2000, and XP. Open up your PNG with TweakPNG, highlight the gAMA row under the Chunk column, right-click, and left-click on Delete. Now save the PNG, and the issue is resolved.

For more information on the PNG file format, visit the W3C specification page here:

http://www.w3.org/TR/PNG/

Leave a Comment

Comments are moderated. No profanity. Only <a>...</a>, <blockquote>...</blockquote>, and <code>...</code> are allowed.

Seperate paragraphs by pressing the "Enter" key twice, or press it once to break to a new line.

6 Comments

#01, Jan 24 2007

Bilge

Thanks a lot for that.

#02, Feb 23 2007

Bo

nice!

#03, Mar 27 2007

Fred

Nice one!
I still wish Microsoft would do something about it, I’ve started using png’s for websites a lot and the alpha capabilities are simply amazing. The fact that IE7 is pretty much (?) the only browser not capable of rendering them properly just baffles me…

#04, Jul 18 2007

Love is not Over » Blog Archive » Using PNGs

[…] Although PNGs will be shown correctly for the most part by IE7, it interprets the gAMA of the PNG as darker than what it should be. […]

#05, Sep 17 2007

Chad’s dailies » Blog Archive » links for 2007-09-17

[…] Remove the gamma (gAMA) chunk from a PNG image to fix darker colors in IE » d’bug (tags: png gamma) […]

#06, Jul 31 2008

PNG, IE, et mon site ne font pas bon ménage - mise à jour | nyamsprod's web labs

[…] fidèlement la raison technique de ce problème je vous invite à découvrir une autre manière de résoudre le gAMA bug pour contenter IE6 et IE7, les derniers navigateurs à encore afficher le bug, en attendant la […]