[html5] r2004 - [o] (2) How to handle transparent images for toDataURL(). Just allow the UA to p [...]

whatwg at whatwg.org whatwg at whatwg.org
Tue Aug 5 02:57:07 PDT 2008


Author: ianh
Date: 2008-08-05 02:57:06 -0700 (Tue, 05 Aug 2008)
New Revision: 2004

Modified:
   index
   source
Log:
[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.

Modified: index
===================================================================
--- index	2008-08-05 09:28:31 UTC (rev 2003)
+++ index	2008-08-05 09:57:06 UTC (rev 2004)
@@ -20799,6 +20799,11 @@
    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.

Modified: source
===================================================================
--- source	2008-08-05 09:28:31 UTC (rev 2003)
+++ source	2008-08-05 09:57:06 UTC (rev 2004)
@@ -18002,6 +18002,11 @@
   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>




More information about the Commit-Watchers mailing list