PNGs and color management in Safari

Sometimes getting the colors in your images to match across browsers is a pain. This is especially true now that Safari 3 and Firefox 3 are rendering images with their embedded color profiles. However, the problem runs deeper. PNGs specifically have gamma correction included in the file and Safari will obey it. So, despite having the same color space, you will get a different rendering in Safari than in Firefox. Here’s how I fixed it.

After a while of on-and-off research trying to figure out why my PNGs were not rendering with the correct colors in Safari, I came across a couple of blog posts. The first, which was very informative, recommends double-checking your embedded color profiles. If they don’t match, the colors will come out differently. That makes a lot of sense. For the web, default to sRGB or don’t include one at all. Most browsers will assume sRGB if there is no color profile included.

I did this and I still had some odd rendering. After some more research I came across this blog post (check out this page for some background info on PNGs on the web) specifically about PNGs. So, there is gamma correction in PNGs that is independent of the color profile. That’s annoying! But, you can strip out all that extra information and have the browser drop back down to defaults with a neat little app called GammaSlamma. Just drop your PNG onto the application and done! For Linux and Windows machines, check out PNGCrush.

Page 1 of 1 pages
This is only here because I think it looks cool.

I'm Georges and I live in Toronto. I am a web developer and it's fun. This is a collection of things that I like and a place for me to record my thoughts on things.

Last Entry

PNGs and color management in Safari

Sometimes getting the colors in your images to match across browsers is a pain. This is especially true now that Safari 3 and Firefox 3 are rendering images with their embedded color profiles. However, the problem runs deeper. PNGs specifically have gamma correction included in the file and Safari will obey it. So, despite having the same color space, you will get a different rendering in Safari than in Firefox. Here’s how I fixed it.

Topics

CSS Stuff

Pointless Statistics

Total Entries: 1
Total Comments: 1
Most Recent Entry: 04/09/2008 08:44 pm
Most Recent Comment on: 04/16/2008 09:42 pm
Most Recent Visitor on: 07/27/2008 03:39 am
The most visitors ever was 36 on 06/06/2008 08:02 pm