[html5] r3230 - [e] (0) Mention that getImageData() might return different pixel data than you s [...]
whatwg at whatwg.org
whatwg at whatwg.org
Fri Jun 12 11:44:50 PDT 2009
Author: ianh
Date: 2009-06-12 11:44:48 -0700 (Fri, 12 Jun 2009)
New Revision: 3230
Modified:
index
source
Log:
[e] (0) Mention that getImageData() might return different pixel data than you set, due to premultiplying.
Modified: index
===================================================================
--- index 2009-06-12 07:49:53 UTC (rev 3229)
+++ index 2009-06-12 18:44:48 UTC (rev 3230)
@@ -25546,6 +25546,12 @@
for all of the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>createImageData()</a></code>, <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>
operations.</p>
+ <p class=note>Due to the lossy nature of converting to and from
+ premultiplied alpha color values, pixels that have just been set
+ using <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code> might be
+ returned to an equivalent <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> as
+ different values.</p>
+
<p>The current path, <a href=#transformations title=dom-context-2d-transformation>transformation matrix</a>,
<a href=#shadows title=shadows>shadow attributes</a>, <a href=#dom-context-2d-globalalpha title=dom-context-2d-globalAlpha>global alpha</a>, the <a href=#clipping-region title="clipping region">clipping region</a>, and <a href=#dom-context-2d-globalcompositeoperation title=dom-context-2d-globalCompositeOperation>global composition
operator</a> must not affect the <code title=dom-context-2d-getImageData><a href=#dom-context-2d-getimagedata>getImageData()</a></code> and <code title=dom-context-2d-putImageData><a href=#dom-context-2d-putimagedata>putImageData()</a></code>
Modified: source
===================================================================
--- source 2009-06-12 07:49:53 UTC (rev 3229)
+++ source 2009-06-12 18:44:48 UTC (rev 3230)
@@ -28085,6 +28085,14 @@
title="dom-context-2d-putImageData">putImageData()</code>
operations.</p>
+ <p class="note">Due to the lossy nature of converting to and from
+ premultiplied alpha color values, pixels that have just been set
+ using <code
+ title="dom-context-2d-putImageData">putImageData()</code> might be
+ returned to an equivalent <code
+ title="dom-context-2d-getImageData">getImageData()</code> as
+ different values.</p>
+
<p>The current path, <span
title="dom-context-2d-transformation">transformation matrix</span>,
<span title="shadows">shadow attributes</span>, <span
More information about the Commit-Watchers
mailing list