diff --git a/source b/source index 52259ce8fce..019de5b716f 100644 --- a/source +++ b/source @@ -65534,10 +65534,10 @@ interface mixin CanvasDrawImage { interface mixin CanvasImageData { // pixel manipulation ImageData createImageData([EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {}); - ImageData createImageData(ImageData imagedata); + ImageData createImageData(ImageData imageData); ImageData getImageData([EnforceRange] long sx, [EnforceRange] long sy, [EnforceRange] long sw, [EnforceRange] long sh, optional ImageDataSettings settings = {}); - undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy); - undefined putImageData(ImageData imagedata, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight); + undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy); + undefined putImageData(ImageData imageData, [EnforceRange] long dx, [EnforceRange] long dy, [EnforceRange] long dirtyX, [EnforceRange] long dirtyY, [EnforceRange] long dirtyWidth, [EnforceRange] long dirtyHeight); }; enum CanvasLineCap { "butt", "round", "square" }; @@ -69918,7 +69918,7 @@ try {
Pixel manipulation
-
imagedata = new ImageData(sw, sh [, settings])
+
imageData = new ImageData(sw, sh [, settings])

Returns an ImageData object with the given dimensions and the color space indicated by settings. All the pixels in the returned object are transparent @@ -69928,7 +69928,7 @@ try { the width or height arguments are zero.

-
imagedata = new ImageData(data, sw [, sh [, settings ] ])
+
imageData = new ImageData(data, sw [, sh [, settings ] ])

Returns an ImageData object using the data provided in the Uint8ClampedArray argument, interpreted using the given @@ -69942,11 +69942,11 @@ try { data and dimensions can't be interpreted consistently, or if either dimension is zero.

-
imagedata = context.createImageData(imagedata)
+
imageData = context.createImageData(imageData)

Returns an ImageData object with the same dimensions and color space as the argument. All the pixels in the returned object are transparent black.

-
imagedata = context.createImageData(sw, sh [, settings])
+
imageData = context.createImageData(sw, sh [, settings])

Returns an ImageData object with the given dimensions. The color space of the returned object is the color space of @@ -69957,7 +69957,7 @@ try { the width or height arguments are zero.

-
imagedata = context.getImageData(sx, sy, sw, sh [, settings])
+
imageData = context.getImageData(sx, sy, sw, sh [, settings])

Returns an ImageData object containing the image data for the given rectangle of the bitmap. The color space of the returned object is the

-
imagedata.width
-
imagedata.height
+
imageData.width
+
imageData.height

Returns the actual dimensions of the data in the ImageData object, in pixels.

-
imagedata.data
+
imageData.data

Returns the one-dimensional array containing the data in RGBA order, as integers in the range 0 to 255.

-
imagedata.colorSpace
+
imageData.colorSpace

Returns the color space of the pixels.

-
context.putImageData(imagedata, dx, dy [, dirtyX, dirtyY, dirtyWidth, dirtyHeight ])
+
context.putImageData(imageData, dx, dy [, dirtyX, dirtyY, dirtyWidth, dirtyHeight ])

Paints the data from the given ImageData object onto the bitmap. If a dirty rectangle is provided, only the pixels from that rectangle are painted.

@@ -69992,7 +69992,7 @@ try { blending, no shadows, etc.

Throws an "InvalidStateError" DOMException if the - imagedata object's data attribute value's + imageData object's data attribute value's [[ViewedArrayBuffer]] internal slot is detached.

@@ -70077,18 +70077,18 @@ try {

The createImageData(imagedata) + data-x="dom-context-2d-createimagedata-imagedata">createImageData(imageData) method steps are:

  1. Let newImageData be a new ImageData object.

  2. Initialize newImageData - given the value of imagedata's width - attribute, the value of imagedata's height + given the value of imageData's width + attribute, the value of imageData's height attribute, and defaultColorSpace set to the value of - imagedata's colorSpace attribute.

  3. + imageData's colorSpace attribute.

  4. Initialize the image data of newImageData to transparent black.

  5. @@ -70232,19 +70232,32 @@ try { component.

    The putImageData() method writes data from - ImageData structures back to the rendering context's output bitmap. Its - arguments are: imagedata, dx, dy, dirtyX, - dirtyY, dirtyWidth, and dirtyHeight.

    + data-x="dom-context-2d-putImageData-short">putImageData(imageData, + dx, dy) method steps are to + put pixels from an + ImageData onto a bitmap, given + imageData, this's output bitmap, + dx, dy, 0, 0, + imageData's width, and + imageData's height.

    -

    When the last four arguments to this method are omitted, they must be assumed to have the - values 0, 0, the width member of the imagedata structure, and the height - member of the imagedata structure, respectively.

    - -

    The method, when invoked, must act as follows:

    - -
      -
    1. Let buffer be imagedata's The putImageData(imageData, + dx, dy, dirtyX, dirtyY, + dirtyWidth, dirtyHeight) method steps are to + put pixels from an + ImageData onto a bitmap, given + imageData, this's output bitmap, + dx, dy, dirtyX, dirtyY, + dirtyWidth, and dirtyHeight.

      + +

      To put pixels from an ImageData + onto a bitmap, given an ImageData imageData, + an output bitmap bitmap, and numbers dx, dy, + dirtyX, dirtyY, dirtyWidth, and dirtyHeight:

      + +
        +
      1. Let buffer be imageData's data attribute value's [[ViewedArrayBuffer]] internal slot.

      2. @@ -70271,12 +70284,12 @@ try {
      3. If dirtyX+dirtyWidth is greater than the width attribute of the imagedata argument, then + data-x="dom-imagedata-width">width attribute of the imageData argument, then let dirtyWidth be the value of that width attribute, minus the value of dirtyX.

        If dirtyY+dirtyHeight is greater than the height attribute of the imagedata argument, then + data-x="dom-imagedata-height">height attribute of the imageData argument, then let dirtyHeight be the value of that height attribute, minus the value of dirtyY.

      4. @@ -70290,12 +70303,14 @@ try { data-x="">dirtyX ≤ x < dirtyX+dirtyWidth and dirtyY ≤ y < dirtyY+dirtyHeight, copy the - four channels of the pixel with coordinate (x, y) in - the imagedata data structure's Canvas Pixel - ArrayBuffer to the pixel with coordinate (dx+x, dy+y) - in the rendering context's output bitmap.

        + data-x="">dirtyY+dirtyHeight, + set the pixel with coordinate (dx+x, + dy+y) in bitmap to the color of the pixel at coordinate + (x, y) in the imageData data structure's + Canvas Pixel ArrayBuffer, + converted from imageData's colorSpace + to the color space of bitmap + using 'relative-colorimetric' rendering intent.

      Due to the lossy nature of converting between color spaces and converting to and