Open Bug 860340 Opened 11 years ago Updated 2 years ago

Firefox bakes system's display color profile into images on load.

Categories

(Core :: Graphics: Color Management, defect)

20 Branch
x86
macOS
defect

Tracking

()

UNCONFIRMED

People

(Reporter: grayson, Unassigned)

References

()

Details

User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_8_3) AppleWebKit/537.31 (KHTML, like Gecko) Chrome/26.0.1410.63 Safari/537.31

Steps to reproduce:

1. With firefox closed, set system display color profile to a non sRGB profile.
2. Open firefox and load the test page: http://www.graysonlang.com/chromebugs/colorprofile/
3. The alert will print out the values for the pixel at position [100,100] in the image. Note what the values are.
4. Close firefox.
5. Set the OS display color profile to a different color profile than before.
6. Reopen firefox and the test page.
7. Note the pixel values have changed.




Actual results:

Currently the image loading pipeline applies the system's display profile at load time.
The pixel values get modified by this process so any image operations in canvas or webGL will potentially be compromised. This bug essentially breaks any image processing pipeline ops that could be done in the browser.


Expected results:

Pixel color values should be the same regardless of the OS's current display color profile. Firefox should only apply the image's internal color profile to the pixel data when it is loaded. The display color profile should only be applied in the rendering/compositing step or left up to the OS to handle.
This bug was initially found in Chrome, though also applies to Firefox. Safari and IE appear to do the right thing. It has been verified on both Windows and OS X. I have not tested on Unix.

The URL of the Chromium bug is:
https://code.google.com/p/chromium/issues/detail?id=229904
Component: Untriaged → GFX: Color Management
Product: Firefox → Core
After additional testing, I've noticed that Safari is not working correctly.

There is another issue that was confusing me. Safari doesn't color manage images that don't have color profiles.

This means that if there is no embedded color profile in an image it shows up on the screen as-is. If there is an embedded profile, then both the embedded profile and the current display profile are applied.
Added another easy test at:
http://www.graysonlang.com/chrometests/colortest/

The images on the page should match the background color specified in the HTML's CSS style.
Sorry, the url is:
http://www.graysonlang.com/chromebugs/colortest/
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.