Unpremultiplied alpha workflow with canvas and transferFromImageBitmap is incorrect
Categories
(Core :: Graphics: Canvas2D, defect, P2)
Tracking
()
People
(Reporter: felix.herbst, Assigned: jgilbert, NeedInfo)
Details
Attachments
(1 file)
322.97 KB,
image/png
|
Details |
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/121.0.0.0 Safari/537.36
Steps to reproduce:
Using transferFromImageBitmap/toDataURL with correct settings for not using premultiplied alpha should allow correctly reading back the original RGB pixels. However, that is currently not possible in Firefox, but works as per the spec in Chrome.
Detailled steps, code, input/output results here:
https://unpremultiplied-readback.glitch.me/
Actual results:
The canvas PNG conversion step does not respect the premultipliedAlpha: "none" setting of the canvas. Instead, the resulting RGB pixels are garbled/contain what looks like random noise data mixed with a bit of retaining information.
Expected results:
Resulting PNG file should be the same/comparable RGBA data as original PNG file, without the RGB pixels being multiplied/divided by alpha.
Comment 1•1 year ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::Graphics: Canvas2D' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•11 months ago
|
||
The severity field is not set for this bug.
:lsalzman, could you have a look please?
For more information, please visit BugBot documentation.
Updated•11 months ago
|
Assignee | ||
Updated•10 months ago
|
Description
•