Skip to content
Browse files

[o] (2) How to handle transparent images for toDataURL(). Just allow …

…the UA to premultiply the alpha and output that whie dropping the alpha channel, instead of worrying about the background color or whatnot. It's up to authors to make the background color non-transparent.

git-svn-id: http://svn.whatwg.org/webapps@2004 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information...
1 parent 03eccd3 commit 6127e346f0a0b4547d5c345e848f2a81b35af4c3 @Hixie Hixie committed
Showing with 10 additions and 0 deletions.
  1. +5 −0 index
  2. +5 −0 source
View
5 index
@@ -20799,6 +20799,11 @@ interface <dfn id=cuerangecallback>CueRangeCallback</dfn> {
or even maybe <code>image/svg+xml</code> if the implementation actually
keeps enough information to reliably render an SVG image from the canvas.
+ <p>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 <code
+ title="">data:</code> URL.
+
<p>Only support for <code>image/png</code> is required. User agents may
support other types. If the user agent does not support the requested
type, it must return the image using the PNG format.
View
5 source
@@ -18002,6 +18002,11 @@ interface <dfn>CueRangeCallback</dfn> {
enough information to reliably render an SVG image from the
canvas.</p>
+ <p>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 <code title="">data:</code> URL.</p>
+
<p>Only support for <code>image/png</code> is required. User agents
may support other types. If the user agent does not support the
requested type, it must return the image using the PNG format.</p>

0 comments on commit 6127e34

Please sign in to comment.
Something went wrong with that request. Please try again.