Open Bug 621498 Opened 14 years ago Updated 2 years ago

Incorrect (darker) colors in images & canvas

Categories

(Firefox :: General, defect)

All
Windows 7
defect

Tracking

()

UNCONFIRMED

People

(Reporter: popoffka, Unassigned)

References

()

Details

User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.15 (KHTML, like Gecko) Chrome/10.0.612.3 Safari/534.15 Build Identifier: Firefox 4.0 Beta 8 So, I've tried opening png image (http://popoffka.ru/foxbug/wall.png) in Firefox and loading it into canvas (http://popoffka.ru/foxbug/index.html). Even though I though it will load OK, it loads with incorrect colors. Colors of the pixels are just slightly darker than the ones in the original picture. Here's a picture that will explain everything: http://popoffka.ru/foxbug/screen.png (however, there are some mistakes in it : 1. I meant beta 8, not beta 7 2. it not only happens in canvas, but also when just opening pictures with Firefox 3. the pictures were resized just for illustrational purposes) Reproducible: Always Steps to Reproduce: 1. Load http://popoffka.ru/foxbug/index.html or http://popoffka.ru/foxbug/wall.png with Firefox 4.0 Beta 8 2. Screenshot it 3. Use colorpicker in Paint.NET (or any other graphical editor) to find out the color of pixel 2;2 on the picture Actual Results: The color is #B97609 Expected Results: The color should be #C67308 (checked by Pain.NET & Google Chrome 10) I haven't used any themes or addons. My computer's configuration is following: Intel Core 2 Duo 6600 @ 2.40 GHz 2 GB of RAM NVIDIA GeForce 8600 GT 256MB Windows 7 Ultimate 32-bit This doesn't happen in Firefox 3.5 for me.
That's probably the color-correction that is happening. Firefox uses the color profile from your display to correct the colors. But i don't know of any change in that part of the code after 3.5. Can you retest with the preference gfx.color_management.mode (type about:config in the location bar, and then search for gfx.color) set to 0 ? The default both in Firefox 3.5 and 4.0 is 2.
I'm experiencing the same issue with a small sprite editor script I've put together. Obviously that creates some problems. When I have gfx.color_management.mode to 1, I see the darker colors. When I have it set to either 0 or 2, it works fine. This appears to be in violation of the Canvas spec's section on color correction. I imagine this particular combination isn't encountered as often. Since 1 means it's trying to color-correct everything, I'm guessing it's trying to color-correct an already color-corrected image when doing canvas.drawImage?
Severity: normal → S3
You need to log in before you can comment on or make changes to this bug.