Bug 40147 - [Canvas] Should pass canvas/philip/tests/toDataURL.jpeg.alpha.html
Summary: [Canvas] Should pass canvas/philip/tests/toDataURL.jpeg.alpha.html
Status: RESOLVED DUPLICATE of bug 68366
Alias: None
Product: WebKit
Classification: Unclassified
Component: Canvas (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.6
: P3 Trivial
Assignee: Nobody
: 48580 (view as bug list)
Depends on:
Blocks: 46506 48575 49365 83973
  Show dependency treegraph
Reported: 2010-06-03 16:22 PDT by Matthew Delaney
Modified: 2012-04-18 20:49 PDT (History)
7 users (show)

See Also:


Note You need to log in before you can comment on or make changes to this bug.
Description Matthew Delaney 2010-06-03 16:22:26 PDT
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.
Comment 1 noel gordon 2010-11-29 20:26:06 PST
Sought clarification on the this section of the <canvas> spec, bug filed.

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.
Comment 2 Mihai Parparita 2010-12-09 18:24:29 PST
*** Bug 48580 has been marked as a duplicate of this bug. ***
Comment 3 noel gordon 2011-01-11 17:18:28 PST
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
Comment 4 Peter Kasting 2011-02-15 15:36:10 PST
This test no longer seems to be failing on Chromium Mac.  Removing it from test_expectations.txt.  Please reopen if this is incorrect.
Comment 5 noel gordon 2011-03-08 00:12:45 PST
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.
Comment 6 Peter Kasting 2011-03-08 10:58:39 PST
Sounds like someone committed "expected failure" results and we need to fix them.
Comment 7 John Bauman 2011-09-26 15:46:49 PDT
Seems to be fixed (with corrected expected result) in 68366.

*** This bug has been marked as a duplicate of bug 68366 ***
Comment 8 noel gordon 2011-09-26 19:21:46 PDT
For the record, dictionary key kCGImageDestinationBackgroundColor didn't help.