For image types that do not support an alpha channel, the image must be composited onto a solid black background using the source-over operator, and the resulting image must be the one used to create the data: URL. Need support to pass this test under CG.
Sought clarification on the this section of the <canvas> spec, bug filed. http://www.w3.org/Bugs/Public/show_bug.cgi?id=11431 issue #1 Safari and Chrome-Mac don't composite JPEG toDataURL onto black. Needs a fix near http://trac.webkit.org/browser/trunk/WebCore/platform/graphics/cg/ImageBufferCG.cpp?rev=70143#L354 to specify the background color via dictionary key kCGImageDestinationBackgroundColor issue #2 philip test toDataURL.jpeg.alpha Is this test correct? Should the alpha channel be ignored (philip test), or should the unpremultiplied RGB values be used instead (FireFox, Safari). http://www.w3.org/Bugs/Public/show_bug.cgi?id=11431 to resolve.
*** Bug 48580 has been marked as a duplicate of this bug. ***
issue #2 philip test toDataURL.jpeg.alpha resolved http://www.w3.org/Bugs/Public/show_bug.cgi?id=11431 WONTFIX, the toDataURL.jpeg.alpha test is correct wrt the <canvas> spec text. Updated chrome linux/win32 to conform to the standard on bug 51237
This test no longer seems to be failing on Chromium Mac. Removing it from test_expectations.txt. Please reopen if this is incorrect.
LayoutTests/platform/mac-snowleopard/canvas/philip/tests/toDataURL.jpeg.alpha-expected.txt contains Failed assertion: got pixel [193,255,192,255] at (50,25), expected [63,127,63,255] +/- 8 That's the result I see on chrome-mac, safari-mac at ToT webkit when I run the test. So still not fixed, reopening this bug.
Sounds like someone committed "expected failure" results and we need to fix them.
Seems to be fixed (with corrected expected result) in 68366. *** This bug has been marked as a duplicate of bug 68366 ***
For the record, dictionary key kCGImageDestinationBackgroundColor didn't help.