Firefox 3.5 color correction hack?

2019-01-22 21:55发布

After finally getting down to upgrading to FF 3.5, I noticed that some of my web pages have color problems. Specifically, say I have a PNG image with a color in it which is meant to be the same as the body's background color but when it is rendered it comes out as lighter than it should be on Windows.

On Mac I'm not seeing this issue, and nor am I seeing it on FF3.0 - Windows or otherwise.

Is there some hack I can add to my code to make FF not color correct the PNG?

9条回答
神经病院院长
2楼-- · 2019-01-22 22:31

This is most likely due to the decision by Firefox to use ICC color profiles by default in Firefox 3.5: See this post on developer.mozilla.org

You can change this in FF3.5 by entering 'about:config' in the address bar, then searching for the parameter: gfx.color_management.mode and setting it to '0' (the default in FF3.0).

查看更多
ら.Afraid
3楼-- · 2019-01-22 22:33

I was having the same problem with the header jpg of my site. I tried to save it again in Photoshop (this time with ICC profile uncheked while saving). Results: files smaller, colors match. Thanks!

查看更多
Viruses.
4楼-- · 2019-01-22 22:36

I've managed to solve this by running all the PNGs through pngcrush and remove all traces of color profiles and such.

pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB in.png out.png
查看更多
登录 后发表回答