Skip to content

Commit

Permalink
[e] (0) Mention that getImageData() might return different pixel data…
Browse files Browse the repository at this point in the history
… than you set, due to premultiplying.

git-svn-id: http://svn.whatwg.org/webapps@3230 340c8d12-0b0e-0410-8428-c7bf67bfef74
  • Loading branch information
Hixie committed Jun 12, 2009
1 parent b4e652f commit 3b74ed3
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
6 changes: 6 additions & 0 deletions index
Expand Up @@ -25546,6 +25546,12 @@ context.getImageData(0, 0, w, h);</pre>
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>
Expand Down
8 changes: 8 additions & 0 deletions source
Expand Up @@ -28085,6 +28085,14 @@ context.getImageData(0, 0, w, h);</pre>
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
Expand Down

0 comments on commit 3b74ed3

Please sign in to comment.