Firefox 3.5 color correction hack?

随声附和 提交于 2019-11-27 13:57:59

问题


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?


回答1:


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



回答2:


Check your image tagging. Specifically I think you can change FF3.5's behaviour in this regard by editing the gfx.color_management.mode property (see here)




回答3:


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).




回答4:


Firefox 3.5 now supports ICC profiles per default. That means that you can control the color output of Firefox via your OS settings.
Propably, your ICC profile is not correct and you have to adapt it in your OS. It's not Firefox i think. You don't need a hack for this.

It's a client problem, as I suspect.




回答5:


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!




回答6:


This comment was very helpful for me:

http://hacks.mozilla.org/2009/06/color-correction/#comment-1490

I just ran

jpegtran -optimize -outfile out.jpg in.jpg

on all of my JPEGs and everything looks like it did before installing 3.5.




回答7:


You can save your images with no profile data (for example if you have a JPG and save it in an old photo editor without that feature) then Firefox doesn't alter it. I have to say, that is a SUPER obnoxious feature. They should have a global on/off switch that you can embed into the HTML code to deal with it. BLah.




回答8:


I know this is a really old thread, just wanted to update. I ran into this very problem with IE9 & FF 17. The problem for me was in the color profile used in Photoshop. This post solved my problem http://bjango.com/articles/photoshop/

Hope this helps someone out there. Happy web building!




回答9:


Try saving images for web (if you're using photoshop), because I guess it's different color scale.



来源:https://stackoverflow.com/questions/1108476/firefox-3-5-color-correction-hack

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!