Short URL: http://html5.org/r/6559
| SVN | Bug | Comment | Time (UTC) |
|---|---|---|---|
| 6559 | 2011-09-21 22:58 |
Index: source
===================================================================
--- source (revision 6558)
+++ source (revision 6559)
@@ -8943,17 +8943,6 @@
</dd>
- <dt>If <var title="">input</var> is a <code>ImageData</code> object</dt>
-
- <dd><p>Let <var title="">output</var> be a newly constructed <code>ImageData</code> object
- with the same <code title="dom-imagedata-width">width</code> and
- <code title="dom-imagedata-height">height</code> as <var
- title="">input</var>, and with a newly constructed
- <code>CanvasPixelArray</code> for its <code
- title="dom-imagedata-data">data</code> attribute, with the same
- <code title="dom-canvaspixelarray-length">length</code> and pixel
- values as the <var title="">input</var>'s.</p></dd>
-
<dt>If <var title="">input</var> is a <code>File</code> object</dt>
<dd><p>Let <var title="">output</var> be a newly constructed <code>File</code> object corresponding to the same underlying data.</p></dd>
@@ -38625,13 +38614,7 @@
interface <dfn>ImageData</dfn> {
readonly attribute unsigned long <span title="dom-imagedata-width">width</span>;
readonly attribute unsigned long <span title="dom-imagedata-height">height</span>;
- readonly attribute <span>CanvasPixelArray</span> <span title="dom-imagedata-data">data</span>;
-};
-
-interface <dfn>CanvasPixelArray</dfn> {
- readonly attribute unsigned long <span title="dom-canvaspixelarray-length">length</span>;
- <span title="dom-CanvasPixelArray-get">getter</span> octet (unsigned long index);
- <span title="dom-CanvasPixelArray-set">setter</span> void (unsigned long index, [Clamp] octet value);
+ readonly attribute <span>Uint8ClampedArray</span> <span title="dom-imagedata-data">data</span>;
};</pre>
<!-- ARC-ORDER note (see above):
@@ -41631,48 +41614,24 @@
title="dom-imagedata-height"><code>height</code></dfn> attribute is
set to <var title="">h</var>, the number of rows in the image data,
and their <dfn title="dom-imagedata-data"><code>data</code></dfn>
- attribute is initialized to a <code>CanvasPixelArray</code> object
- holding the image data. At least one pixel's worth of image data
- must be returned.</p>
+ attribute is initialized to a <code>Uint8ClampedArray</code> object.
+ The <code>Uint8ClampedArray</code> object must use a <span>Canvas
+ Pixel <code>ArrayBuffer</code></span> for its storage, and must have
+ a zero start offset and a length equal to the length of its storage,
+ in bytes. The <span>Canvas Pixel <code>ArrayBuffer</code></span>
+ must contain the image data. At least one pixel's worth of image
+ data must be returned. <a href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
- <p>The <code>CanvasPixelArray</code> object provides ordered,
- indexed access to the color components of each pixel of the image
- data. The data must be represented in left-to-right order, row by
- row top to bottom, starting with the top left, with each pixel's
- red, green, blue, and alpha components being given in that order for
- each pixel. Each component of each device pixel represented in this
- array must be in the range 0..255, representing the 8 bit value for
- that component. The components must be assigned consecutive indices
- starting with 0 for the top left pixel's red component.</p>
+ <p>A <dfn>Canvas Pixel <code>ArrayBuffer</code></dfn> is an
+ <code>ArrayBuffer</code> that whose data is represented in
+ left-to-right order, row by row top to bottom, starting with the top
+ left, with each pixel's red, green, blue, and alpha components being
+ given in that order for each pixel. Each component of each device
+ pixel represented in this array must be in the range 0..255,
+ representing the 8 bit value for that component. The components must
+ be assigned consecutive indices starting with 0 for the top left
+ pixel's red component. <a href="#refsTYPEDARRAY">[TYPEDARRAY]</a></p>
- <p>The <code>CanvasPixelArray</code> object thus represents <var
- title="">h</var>×<var title="">w</var>×4 integers. The
- <dfn title="dom-canvaspixelarray-length"><code>length</code></dfn>
- attribute of a <code>CanvasPixelArray</code> object must return this
- number.</p>
-
- <p>The object's <span>supported property indices</span> are the
- numbers in the range 0 .. <span title=""><var
- title="">h</var>×<var title="">w</var>×4-1</span>.</p>
-
- <p>To <dfn title="dom-CanvasPixelArray-get">determine the value of
- an indexed property</dfn> <var title="">index</var>, the user agent
- must return the value of the <var title="">index</var>th component
- in the array.</p>
-
- <p>To <dfn title="dom-CanvasPixelArray-set">set the value of an
- existing indexed property</dfn> <var title="">index</var> to value
- <var title="">value</var>, the value of the <var
- title="">index</var>th component in the array must be set to <var
- title="">value</var>.</p>
-
- <p class="note">The width and height (<var title="">w</var> and <var
- title="">h</var>) might be different from the <var title="">sw</var>
- and <var title="">sh</var> arguments to the above methods, e.g. if
- the canvas is backed by a high-resolution bitmap, or if the <var
- title="">sw</var> and <var title="">sh</var> arguments are
- negative.</p>
-
<p>The <dfn
title="dom-context-2d-putImageData"><code>putImageData(<var
title="">imagedata</var>, <var title="">dx</var>, <var