DNS Projects HTTP Projects OSS Projects Testing DNS Servers View Headers Main Page





Perfect Color Matching


Posted: 08/21/2009 Ron Scheckelhoff
FF 3.5 color switch-up


I recently loaded a copy of the new Firefox 3.5 browser onto my FreeBSD 7.2 box, and surfed to this site, only to be shocked by the poor color matching between image edges and CSS-set background colors. A little while later, with help from the hacks.mozilla.org site, I was able to make sense of things, and to find an easy solution.

A good explanation for the sudden appearance of color rendering issues that may be observed when using the new FF 3.5 browser can be found at the following link: http://hacks/mozilla.org/2009/06/color-correction

The article (linked above) is authored by Christopher Blizzard.

It turns out that png images have always been capable of containing "embedded" color correction information, to make different devices (LCD, CRT, etc) look the same (in terms of color) to the viewer. This color information was ignored prior to FF 3.0 and so had no effect on color rendition.

The images that I have, for the most part, incorporated into the various sites that I maintain, are png images developed with the GIMP imaging software. Unknown to me, the GIMP program was supplying color correction information in sRGB format and embedding it into the "png" images.

The quick solution (to bring FF3.5 color rendition back to 2.0 status), was found on the afore-referenced site. The author mentioned that it is possible to use the pngcrush utility to strip color correction information from the images:
http://pmt.sourceforge.net/pngcrush/

The syntax, in my case (since my images contained the sRGB info), is shown below:

pngcrush -rem sRGB in.png out.png

Other switches can be used to eliminate other correction factors ...

-rem gAMA
-rem cHRM
-rem -iCCP

Thanks go out to the authors of pngcrush (to be found on sourceforge.net), as the utility successfully removed the correction information and returned the "look and feel" of the site to the same (bland) format that I was accustomed to viewing with ff 2.0. Distressingly, another message post that I came across indicated that Internet Explorer 8 does the same thing! Since it is rare that I look at any web sites via the use of a MS Windows computer, it it likely that the ugly mismatch has been noticed by surfers from the Windows world.

At some point in the future it might be advantageous, of course, to make the necessary changes in order to take advantage of embedded color correction information. With the balance of the population using LCD monitors at this time, I have decided to move the project to the back burner.

In the meantime, any reader who has been nonchalantly ignoring the color correction information that (perhaps invisibly) has been inserted into site images, might want to make some use of the pngcrush tool or some other tool that is appropriate for the image format. FF version 3.5 is quickly catching on with the computing public (especially in Europe), and you might not realize just how ugly a color mismatch in a page arrangement can be.

All of my site images are png images, as the lack of patent encumberment alone is reason to use them. Users of jpegs have been getting hit with lawsuits (as recently as 2008). I think that the patents expired in 2008, but I have decided to take no chances. The pngs are great anyway, and now even Microsoft Windows programs almost universally support them.


attribution: This site and it's authors have absolutely no affiliation with, and are not endorsed by Mozilla, Microsoft, or any other entities mentioned on this opinion page.

1pngcrush, as referenced in this article is copyright Glenn Randers-Pehrson 1998-2009 Andreas Dilger, and Eric Schalnat

Note: The use of any of the information on these pages is entirely at the user's risk. No guarantee of accuracy is suggested or implied, and this information has been collated primarily for the use of Datazygte staff. The information is what it is, it is "as is", and nothing more. No license is given for redistribution or commercial use, and no use beyond the satisfaction of intellectual curiosity is expected. Neither the company nor the individual contributors may be held liable for any direct, indirect, or consequential damages, however caused, and on any theory of liability, arising out of or as a result of contact with any information on this site ...

contact: ron scheckelhoff -- rscheckelhoff@fourcalorieservers.com