[html5] r1771 - /

whatwg at whatwg.org whatwg at whatwg.org
Fri Jun 13 01:59:41 PDT 2008


Author: ianh
Date: 2008-06-13 01:59:40 -0700 (Fri, 13 Jun 2008)
New Revision: 1771

Modified:
   index
   source
Log:
[o] (2) toDataURL() arguments for image/jpeg. (Re: <canvas> JPEG quality)

Modified: index
===================================================================
--- index	2008-06-13 08:49:25 UTC (rev 1770)
+++ index	2008-06-13 08:59:40 UTC (rev 1771)
@@ -18292,14 +18292,35 @@
    canvas has either no height or no width, in which case the result might
    simply be "<code title="">data:,</code>".)
 
-  <p>Arguments other than the <var title="">type</var> must be ignored, and
-   must not cause the user agent to raise an exception (as would normally
-   occur if a method was called with the wrong number of arguments). A future
-   version of this specification will probably allow extra parameters to be
-   passed to <code title=dom-canvas-toDataURL><a
-   href="#todataurl">toDataURL()</a></code> to allow authors to more
-   carefully control compression settings, image metadata, etc.
+  <p>If the method is invoked with the first argument giving a type
+   corresponding to one of the types given in the first column of the
+   following table, and the user agent supports that type, then the
+   subsequent arguments, if any, must be treated as described in the second
+   cell of that row.
 
+  <table>
+   <thead>
+    <tr>
+     <th> Type
+
+     <th> Other arguments
+
+   <tbody>
+    <tr>
+     <td> image/jpeg
+
+     <td> The second argument, if it is a number between 0.0 and 1.0, must be
+      treated as the desired quality level.
+  </table>
+
+  <p>Other arguments must be ignored and must not cause the user agent to
+   raise an exception (as would normally occur if a method was called with
+   the wrong number of arguments). A future version of this specification
+   will probably allow extra parameters to be passed to <code
+   title=dom-canvas-toDataURL><a href="#todataurl">toDataURL()</a></code> to
+   allow authors to more carefully control compression settings, image
+   metadata, etc.
+
   <h5 id=the-2d><span class=secno>3.11.11.1. </span>The 2D context</h5>
 
   <p>When the <code title=dom-canvas-getContext><a

Modified: source
===================================================================
--- source	2008-06-13 08:49:25 UTC (rev 1770)
+++ source	2008-06-13 08:59:40 UTC (rev 1771)
@@ -15897,16 +15897,31 @@
   this is if the canvas has either no height or no width, in which
   case the result might simply be "<code title="">data:,</code>".)</p>
 
-  <p>Arguments other than the <var title="">type</var> must be
-  ignored, and must not cause the user agent to raise an exception (as
-  would normally occur if a method was called with the wrong number of
-  arguments). A future version of this specification will probably
-  allow extra parameters to be passed to <code
-  title="dom-canvas-toDataURL">toDataURL()</code> to allow authors to
-  more carefully control compression settings, image metadata,
-  etc.</p>
+  <p>If the method is invoked with the first argument giving a type
+  corresponding to one of the types given in the first column of the
+  following table, and the user agent supports that type, then the
+  subsequent arguments, if any, must be treated as described in the
+  second cell of that row.</p>
 
+  <table>
+   <thead>
+    <tr> <th> Type <th> Other arguments
+   <tbody>
+    <tr>
+     <td> image/jpeg
+     <td> The second argument, if it is a number between 0.0 and 1.0,
+     must be treated as the desired quality level.
+  </table>
 
+  <p>Other arguments must be ignored and must not cause the user agent
+  to raise an exception (as would normally occur if a method was
+  called with the wrong number of arguments). A future version of this
+  specification will probably allow extra parameters to be passed to
+  <code title="dom-canvas-toDataURL">toDataURL()</code> to allow
+  authors to more carefully control compression settings, image
+  metadata, etc.</p>
+
+
   <h5>The 2D context</h5>
 
   <p>When the <code title="dom-canvas-getContext">getContext()</code>




More information about the Commit-Watchers mailing list