[html5] r1196 - /
whatwg at whatwg.org
whatwg at whatwg.org
Sat Feb 2 22:59:15 PST 2008
Author: ianh
Date: 2008-02-02 22:59:10 -0800 (Sat, 02 Feb 2008)
New Revision: 1196
Modified:
index
source
Log:
[gow] (2) Changes to <canvas> color correction requirements
Modified: index
===================================================================
--- index 2008-02-02 20:56:07 UTC (rev 1195)
+++ index 2008-02-03 06:59:10 UTC (rev 1196)
@@ -24,7 +24,7 @@
<h1 id=html-5>HTML 5</h1>
- <h2 class="no-num no-toc" id=working>Working Draft — 2 February 2008</h2>
+ <h2 class="no-num no-toc" id=working>Working Draft — 3 February 2008</h2>
<p>You can take part in this work. <a
href="http://www.whatwg.org/mailing-list">Join the working group's
@@ -17687,7 +17687,7 @@
// support methods
function FillPlasma(data, color) { ... }
- function AddCload(data, x, y) { ... }
+ function AddCloud(data, x, y) { ... }
</pre>
</div>
@@ -17804,26 +17804,45 @@
<p>The <code><a href="#canvas">canvas</a></code> APIs must perform colour
correction at only two points: when rendering images with their own gamma
- correction information onto the canvas, to convert the image to the color
- space used by the canvas (e.g. using the <code
+ correction and color space information onto the canvas, to convert the
+ image to the color space used by the canvas (e.g. using the <code
title=dom-context-2d-drawImage><a href="#drawimage">drawImage()</a></code>
method with an <code><a
href="#htmlimageelement">HTMLImageElement</a></code> object), and when
rendering the actual canvas bitmap to the output device.
- <p>Thus, in the 2D context, colors used to draw shapes onto the canvas will
- exactly match colors obtained through the <code
+ <p class=note>Thus, in the 2D context, colors used to draw shapes onto the
+ canvas will exactly match colors obtained through the <code
title=dom-context-2d-getImageData><a
href="#getimagedata">getImageData()</a></code> method.
<p>The <code title=dom-canvas-toDataURL><a
href="#todataurl">toDataURL()</a></code> method must not include color
- space information in the resource returned.
+ space information in the resource returned. Where the output format allows
+ it, the color of pixels in resources created by <code
+ title=dom-canvas-toDataURL><a href="#todataurl">toDataURL()</a></code>
+ must match those returned by the code
+ title="dom-context-2d-getImageData">getImageData() method.
<p>In user agents that support CSS, the color space used by a <code><a
href="#canvas">canvas</a></code> element must match the color space used
for processing any colors for that element in CSS.
+ <p>The gamma correction and color space information of images must be
+ handled in such a way that an image rendered directly using an <code><a
+ href="#img">img</a></code> element would use the same colors as one
+ painted on a <code><a href="#canvas">canvas</a></code> element that is
+ then itself rendered. Furthermore, the rendering of images that have no
+ color correction information (such as those returned by the <code
+ title=dom-canvas-toDataURL><a href="#todataurl">toDataURL()</a></code>
+ method) must be rendered with no color correction.
+
+ <p class=note>Thus, in the 2D context, calling the <code
+ title=dom-context-2d-drawImage><a href="#drawimage">drawImage()</a></code>
+ method to render the output of the <code title=dom-canvas-toDataURL><a
+ href="#todataurl">toDataURL()</a></code> method to the canvas, given the
+ appropriate dimensions, has no visible effect.
+
<h5 id=security1><span class=secno>3.14.11.3. </span>Security with <code><a
href="#canvas">canvas</a></code> elements</h5>
Modified: source
===================================================================
--- source 2008-02-02 20:56:07 UTC (rev 1195)
+++ source 2008-02-03 06:59:10 UTC (rev 1196)
@@ -15282,7 +15282,7 @@
// support methods
function FillPlasma(data, color) { ... }
- function AddCload(data, x, y) { ... }
+ function AddCloud(data, x, y) { ... }
</pre>
</div>
@@ -15411,26 +15411,44 @@
<p>The <code>canvas</code> APIs must perform colour correction at
only two points: when rendering images with their own gamma
- correction information onto the canvas, to convert the image to the
- color space used by the canvas (e.g. using the <code
- title="dom-context-2d-drawImage">drawImage()</code> method with an
- <code>HTMLImageElement</code> object), and when rendering the actual
- canvas bitmap to the output device.</p>
+ correction and color space information onto the canvas, to convert
+ the image to the color space used by the canvas (e.g. using the
+ <code title="dom-context-2d-drawImage">drawImage()</code> method
+ with an <code>HTMLImageElement</code> object), and when rendering
+ the actual canvas bitmap to the output device.</p>
- <p>Thus, in the 2D context, colors used to draw shapes onto the
- canvas will exactly match colors obtained through the <code
+ <p class="note">Thus, in the 2D context, colors used to draw shapes
+ onto the canvas will exactly match colors obtained through the <code
title="dom-context-2d-getImageData">getImageData()</code>
method.</p>
<p>The <code title="dom-canvas-toDataURL">toDataURL()</code> method
must not include color space information in the resource
- returned.</p>
+ returned. Where the output format allows it, the color of pixels in
+ resources created by <code
+ title="dom-canvas-toDataURL">toDataURL()</code> must match those
+ returned by the code
+ title="dom-context-2d-getImageData">getImageData()</code>
+ method.</p>
<p>In user agents that support CSS, the color space used by a
<code>canvas</code> element must match the color space used for
processing any colors for that element in CSS.</p>
+ <p>The gamma correction and color space information of images must
+ be handled in such a way that an image rendered directly using an
+ <code>img</code> element would use the same colors as one painted on
+ a <code>canvas</code> element that is then itself
+ rendered. Furthermore, the rendering of images that have no color
+ correction information (such as those returned by the <code
+ title="dom-canvas-toDataURL">toDataURL()</code> method) must be
+ rendered with no color correction.</p>
+ <p class="note">Thus, in the 2D context, calling the <code
+ title="dom-context-2d-drawImage">drawImage()</code> method to render
+ the output of the <code
+ title="dom-canvas-toDataURL">toDataURL()</code> method to the
+ canvas, given the appropriate dimensions, has no visible effect.</p>
<h5>Security with <code>canvas</code> elements</h5>
More information about the Commit-Watchers
mailing list