Open
Bug 1124060
Opened 11 years ago
Updated 3 years ago
Premultiplication destroys some alpha images in web content use cases
Categories
(Core :: Graphics: ImageLib, defect, P3)
Core
Graphics: ImageLib
Tracking
()
NEW
People
(Reporter: noel.gordon, Unassigned)
Details
(Keywords: parity-safari, reproducible, testcase, Whiteboard: [gfx-noted])
Attachments
(2 files)
User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36
Steps to reproduce:
For example, encoding <canvas> content via toDataURL as image/png (lossless) into a new Image(), where the canvas contains alpha values near 0.5, and then drawing that Image() onto a new canvas with drawImage(), and repeating this process over and over, should be idempotent. For some alpha values, the image is slowly destroyed.
Test case attached: for Firefox, set alpha=0.498 for example, and keep pressing the test button.
Actual results:
The canvas image slowly fades to gray with each test button press.
Other browsers:
IE9+: works.
Chrome 39 stable: broken.
Firefox 33.0.3: broken.
Safari 6: broken.
Safari 7: works.
Expected results:
The canvas image should not fade away for any alpha in the neigbourhood of 0.5.
| Reporter | ||
Comment 1•11 years ago
|
||
Test-case result for alpha=0.498 on Firefox 33.0.3
| Reporter | ||
Comment 2•11 years ago
|
||
Updated•11 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Keywords: reproducible,
testcase
OS: Windows 7 → All
Product: Firefox → Core
Hardware: x86_64 → All
Whiteboard: [parity-Safari]
Version: 33 Branch → Trunk
Comment 3•11 years ago
|
||
Seth, can you help place/prioritize/find-a-someone for this? Not sure if this is canvas, imagelib, gfx, or somewhere in the middle. :-)
Flags: needinfo?(seth)
Comment 4•11 years ago
|
||
This probably exists at the intersection of canvas and ImageLib, which is good news since I'm about to start focusing on canvas work once I get the recent ImageLib regressions cleaned up.
I'll come back to this once I switch over to canvas.
| Reporter | ||
Comment 5•11 years ago
|
||
Fixed in chromium: https://code.google.com/p/chromium/issues/detail?id=450189
| Reporter | ||
Comment 6•11 years ago
|
||
I believe that Gecko uses (or once used) a table-driven method to compute pixel alpha pre-multiplication. Perhaps the table data was computed from a truncating pre-multiply routine?
Perhaps try a rounding one. That was the problem in Chrome a least - a truncating premultiply in the image decoders. I changed the decoders to use a rounding pre-multiply and the alpha channel instability was gone.
HTH.
Updated•10 years ago
|
Component: Untriaged → ImageLib
Comment 7•10 years ago
|
||
I actually suspect this is more likely to be in the Canvas code. We should probably just fix this.
Whiteboard: [parity-Safari] → [parity-Safari][gfx-noted]
Updated•8 years ago
|
Priority: -- → P3
Comment 8•8 years ago
|
||
Mass bug change to replace various 'parity' whiteboard flags with the new canonical keywords. (See bug 1443764 comment 13.)
Keywords: parity-safari
Whiteboard: [parity-Safari][gfx-noted] → [gfx-noted]
Comment 9•3 years ago
|
||
Clear a needinfo that is pending on an inactive user.
Inactive users most likely will not respond; if the missing information is essential and cannot be collected another way, the bug maybe should be closed as INCOMPLETE.
For more information, please visit auto_nag documentation.
Flags: needinfo?(seth.bugzilla)
Updated•3 years ago
|
Severity: normal → S3
You need to log in
before you can comment on or make changes to this bug.
Description
•