The infamous PNG gamma/color correction problem

PNG images are great for Web work, but there's one problem that was really getting on my nerves: the color correction problem. PNG images, like many other formats, support embedded ICC profiles for color management. For websites this feature can become a big hassle since some Internet browsers (namely, Safari 3.x and up) will adjust the gamma and colors of images according to their embedded profiles, but the colors defined in CSS stylesheets are viewed with the native color profile. So if an image with an embedded ICC profile is used in combination with "background: " rules defined in a CSS stylesheet, the image will not match the background color of the page!

Fortunately, GIMP is capable of converting an image's embedded profile into the sRGB profile which was designed for use on the Internet.

First, GIMP requires a bit of setup:

  1. Select the color profile for your display by selecting Edit > Preferences from the menu and clicking on the Color Management section
  2. Set Mode of Operation to Color managed display
  3. From the Monitor Profile drop-down box, choose Select color profile from disk... and select the ICC profile which is you are currently using (tip: On OS X, ICC profiles are stored in /Library/ColorSync)

Once GIMP has been informed about which ICC profile your display is using, it can convert embedded profiles to the sRGB workspace:

  1. Open the image you want to convert
  2. Select Image > Mode > Assign from the menu and ensure that the sRGB profile is currently assigned
  3. Select Image > Mode > Convert from the menu and select the ICC profile that your display is using (the same one you chose in the setup sets)
  4. Save the image and if applicable, pass it through pngcrush to make it smaller
Rating: 

Comments

I realised it was the embedded colour profiles that were causing me grief some time a go, when I read this forum posting about Firefox 3.5+ doing the exact same thing. I was just learning to live with it when I found this - the power of GIMP never ceases to amaze me! :)

Thanks for showing me the method. I will try it out and will tell you how it goes after going to www.assignment-help-sydney.com and having an essay writer working on my research papers as soon as possible.

From his teenage years until today, Ralph Lauren has always expressed a burning, desire to create fashion Cheap Ralph Lauren Outlet for men, women and children that is far from the ordinary. Blessed with a natural, in-born gift for fashion-designing, the uncanny ability to set new trends in fashion design, and a sharp eye for detail, style and elegance, Ralph Lauren painstakingly, built the fashion Ralph Lauren Outlet UK it is today.The Ralph Lauren Shirts embody the very talents and spirit described above and reflects everything that this fashion mogul is all about. Purchasing Ralph Lauren Shirts is easy if you have the bucks, and know a little about what types of shirts are marketed under this top-drawer, luxury designer label. For example, a wide variety of casual and semi-formal, Ralph Lauren Shirts are available under his signature, "Purple" label collection. For more formal men's Ralph Lauren Outlet wear, such as the exquisite, Ralph Lauren dress shirts, you may check his "Black" label collection. Of course, if you're looking for the perennial, favorite - Ralph Lauren Polo at http://www.ukralphlauren.co.uk Shirts - there's the separate 'Polo Ralph Lauren' collection, too.

No, I do not think that it is infamous as everyone in my reach knows about it! Even my colleagues at these paper writing services are well aware of all of this and frequently have a discussion on it. Anyways, you have provided much more info to me here and I would really like to share it with others as well.