Closed
Bug 611371
Opened 15 years ago
Closed 14 years ago
Red color component reported by getImageData is incorrect
Categories
(Core :: Graphics: Canvas2D, defect)
Tracking
()
RESOLVED
INVALID
People
(Reporter: kuvik3, Unassigned)
References
()
Details
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101111 Firefox/4.0b8pre
Build Identifier: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b8pre) Gecko/20101111 Firefox/4.0b8pre
When I try to get RGB color of an image pixel through getImageData method, Minefield returns incorrect information. Image has Red = 0, but Minefield reports Red = 1.
This works correctly in Firefox 3.6, Opera 10.6, IE9, Chrome, Safari.
I have Direct2D disabled, and turning off layers acceleration didn't help.
Tested on Windows 7 and Windows XP with same result.
Reproducible: Always
Steps to Reproduce:
1. Load testcase
2. Red component should be 0, not 1
wonder if you're being hit by color correction; your png has a color profile embedded and gamma information embedded, which means that we'll color correct it and convert to your display profile. Try removing all those chunks form your png image (sRGB, gAMA, cHRM) using something like tweakpng
I used pngcrush to remove everything unnecessary from file and it works now.
Which browsers have correct behavior? Minefield, or others?
Hard to say; color correction behavior is unspecified for canvas & images. For stuff where you need exact color values, removing the chunks should give you the same results in all browsers. In the future we may have a way to explicitly say "do not apply any correction to this image", but probably won't be for firefox 4.
Comment 4•14 years ago
|
||
We now have a way to disable colour correction per image (though it might be WebGL-only, I don't recall). Anyways, we were always doing the right thing here IMO.
Status: UNCONFIRMED → RESOLVED
Closed: 14 years ago
Resolution: --- → INVALID
You need to log in
before you can comment on or make changes to this bug.
Description
•