[html5] r8132 - [giow] (1) Allow UAs to use algorithms other than nearest-neighbour when scaling [...]
whatwg at whatwg.org
whatwg at whatwg.org
Tue Aug 6 13:30:51 PDT 2013
Author: ianh
Date: 2013-08-06 13:30:50 -0700 (Tue, 06 Aug 2013)
New Revision: 8132
Modified:
complete.html
index
source
Log:
[giow] (1) Allow UAs to use algorithms other than nearest-neighbour when scaling images down.
Affected topics: Canvas
Modified: complete.html
===================================================================
--- complete.html 2013-08-06 20:18:53 UTC (rev 8131)
+++ complete.html 2013-08-06 20:30:50 UTC (rev 8132)
@@ -36338,11 +36338,12 @@
behavior is "<code title="">repeat-y</code>", or in all four directions all over the bitmap, if
the repetition behavior is "<code title="">repeat</code>".</p>
+<!--CLEANUP-->
<p>If the original image data is a bitmap image, the value painted at a point in the area of the
- repetitions is computed by filtering the original image data. If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code> attribute is set to
- true, then the user agent may use any filtering algorithm (for example bilinear interpolation or
- nearest-neighbor). If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code> attribute is set to
- false, the image must be rendered using nearest-neighbor interpolation. When such a filtering
+ repetitions is computed by filtering the original image data. When scaling up, if the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code> attribute is set to
+ true, the image must be rendered using nearest-neighbor interpolation. Otherwise, the user agent
+ may use any filtering algorithm (for example bilinear interpolation or nearest-neighbor). When
+ such a filtering
algorithm requires a pixel value from outside the original image data, it must instead use the
value from wrapping the pixel's coordinates to the original image's dimensions. (That is, the
filter uses 'repeat' behavior, regardless of the value of the pattern's repetition behavior.)</p>
@@ -37314,13 +37315,13 @@
negative. <!-- note: that last sentence has several times been needed to correct people who
suggested that 5,5,-2,-2 was different than 3,3,2,2 --></p>
- <p>If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
- attribute is set to true, then the user agent should attempt to apply a smoothing algorithm to
+ <p>When scaling up, if the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
+ attribute is set to true, the user agent should attempt to apply a smoothing algorithm to
the image data when it is scaled. Otherwise, the image must be rendered using nearest-neighbor
interpolation.</p>
<p class=note>This specification does not define the precise algorithm to use when scaling an
- image when the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
+ image down, or when scaling an image up when the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
attribute is set to true.</p>
<p class=note>When a <code><a href=#the-canvas-element>canvas</a></code> or <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object is
@@ -38484,7 +38485,7 @@
<dd>
<p>Returns whether pattern fills and the <code title=dom-context-2d-drawImage><a href=#dom-context-2d-drawimage>drawImage()</a></code> method will attempt to smooth images if
- their pixels don't line up exactly with the display.</p>
+ their pixels don't line up exactly with the display, when scaling images up.</p>
<p>Can be set, to change whether images are smoothed (true) or not (false).</p>
Modified: index
===================================================================
--- index 2013-08-06 20:18:53 UTC (rev 8131)
+++ index 2013-08-06 20:30:50 UTC (rev 8132)
@@ -36338,11 +36338,12 @@
behavior is "<code title="">repeat-y</code>", or in all four directions all over the bitmap, if
the repetition behavior is "<code title="">repeat</code>".</p>
+<!--CLEANUP-->
<p>If the original image data is a bitmap image, the value painted at a point in the area of the
- repetitions is computed by filtering the original image data. If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code> attribute is set to
- true, then the user agent may use any filtering algorithm (for example bilinear interpolation or
- nearest-neighbor). If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code> attribute is set to
- false, the image must be rendered using nearest-neighbor interpolation. When such a filtering
+ repetitions is computed by filtering the original image data. When scaling up, if the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code> attribute is set to
+ true, the image must be rendered using nearest-neighbor interpolation. Otherwise, the user agent
+ may use any filtering algorithm (for example bilinear interpolation or nearest-neighbor). When
+ such a filtering
algorithm requires a pixel value from outside the original image data, it must instead use the
value from wrapping the pixel's coordinates to the original image's dimensions. (That is, the
filter uses 'repeat' behavior, regardless of the value of the pattern's repetition behavior.)</p>
@@ -37314,13 +37315,13 @@
negative. <!-- note: that last sentence has several times been needed to correct people who
suggested that 5,5,-2,-2 was different than 3,3,2,2 --></p>
- <p>If the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
- attribute is set to true, then the user agent should attempt to apply a smoothing algorithm to
+ <p>When scaling up, if the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
+ attribute is set to true, the user agent should attempt to apply a smoothing algorithm to
the image data when it is scaled. Otherwise, the image must be rendered using nearest-neighbor
interpolation.</p>
<p class=note>This specification does not define the precise algorithm to use when scaling an
- image when the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
+ image down, or when scaling an image up when the <code title=dom-context-2d-imageSmoothingEnabled><a href=#dom-context-2d-imagesmoothingenabled>imageSmoothingEnabled</a></code>
attribute is set to true.</p>
<p class=note>When a <code><a href=#the-canvas-element>canvas</a></code> or <code><a href=#canvasrenderingcontext2d>CanvasRenderingContext2D</a></code> object is
@@ -38484,7 +38485,7 @@
<dd>
<p>Returns whether pattern fills and the <code title=dom-context-2d-drawImage><a href=#dom-context-2d-drawimage>drawImage()</a></code> method will attempt to smooth images if
- their pixels don't line up exactly with the display.</p>
+ their pixels don't line up exactly with the display, when scaling images up.</p>
<p>Can be set, to change whether images are smoothed (true) or not (false).</p>
Modified: source
===================================================================
--- source 2013-08-06 20:18:53 UTC (rev 8131)
+++ source 2013-08-06 20:30:50 UTC (rev 8132)
@@ -39570,13 +39570,13 @@
behavior is "<code title="">repeat-y</code>", or in all four directions all over the bitmap, if
the repetition behavior is "<code title="">repeat</code>".</p>
+<!--CLEANUP-->
<p>If the original image data is a bitmap image, the value painted at a point in the area of the
- repetitions is computed by filtering the original image data. If the <code
+ repetitions is computed by filtering the original image data. When scaling up, if the <code
title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code> attribute is set to
- true, then the user agent may use any filtering algorithm (for example bilinear interpolation or
- nearest-neighbor). If the <code
- title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code> attribute is set to
- false, the image must be rendered using nearest-neighbor interpolation. When such a filtering
+ true, the image must be rendered using nearest-neighbor interpolation. Otherwise, the user agent
+ may use any filtering algorithm (for example bilinear interpolation or nearest-neighbor). When
+ such a filtering
algorithm requires a pixel value from outside the original image data, it must instead use the
value from wrapping the pixel's coordinates to the original image's dimensions. (That is, the
filter uses 'repeat' behavior, regardless of the value of the pattern's repetition behavior.)</p>
@@ -40708,13 +40708,13 @@
negative. <!-- note: that last sentence has several times been needed to correct people who
suggested that 5,5,-2,-2 was different than 3,3,2,2 --></p>
- <p>If the <code title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code>
- attribute is set to true, then the user agent should attempt to apply a smoothing algorithm to
+ <p>When scaling up, if the <code title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code>
+ attribute is set to true, the user agent should attempt to apply a smoothing algorithm to
the image data when it is scaled. Otherwise, the image must be rendered using nearest-neighbor
interpolation.</p>
<p class="note">This specification does not define the precise algorithm to use when scaling an
- image when the <code title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code>
+ image down, or when scaling an image up when the <code title="dom-context-2d-imageSmoothingEnabled">imageSmoothingEnabled</code>
attribute is set to true.</p>
<p class="note">When a <code>canvas</code> or <code>CanvasRenderingContext2D</code> object is
@@ -42117,7 +42117,7 @@
<p>Returns whether pattern fills and the <code
title="dom-context-2d-drawImage">drawImage()</code> method will attempt to smooth images if
- their pixels don't line up exactly with the display.</p>
+ their pixels don't line up exactly with the display, when scaling images up.</p>
<p>Can be set, to change whether images are smoothed (true) or not (false).</p>
More information about the Commit-Watchers
mailing list