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.
See:
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#dom-canvas-todataurl
Mozilla
Bug 650720
Output:
Type: |
image/png |
image/jpeg |
image/bmp (24 bpp) |
image/bmp (32 bpp) |
rgba(128, 255, 128, 0.5) |
|
|
|
|
rgba(255, 128, 128, 0.75) |
|
|
|
|
rgba(128, 128, 255, 0.25) |
|
|
|
|
rgba(255, 255, 255, 1.0) |
|
|
|
|
rgba(255, 255, 255, 0) |
|
|
|
|
rgba(0, 0, 0, 1.0) |
|
|
|
|
rgba(0, 0, 0, 0) |
|
|
|
|