From d0a8cd81410080c6cb46841140f114945d6cbb3d Mon Sep 17 00:00:00 2001
From: Christopher Cameron
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.
ImageData onto a bitmap, given
+ imageData, the output bitmap of the rendering context,
+ dx, dy, 0, 0,
+ the width of
+ the imageData structure, and
+ the height of
+ the imageData structure.
- 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:
- -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, the output bitmap of the rendering context,
+ 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:
Let buffer be imageData's data attribute value's [[ViewedArrayBuffer]] internal
slot.
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.
ArrayBuffer to the pixel with coordinate (dx+x, dy+y)
- in the rendering context's output bitmap.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
From 15275a5cbf5ddc475e38b2d9751c91fce9f36f70 Mon Sep 17 00:00:00 2001
From: Christopher Cameron Returns an Returns an Returns an Returns an Returns an Returns the actual dimensions of the data in the Returns the one-dimensional array containing the data in RGBA order, as integers in the
range 0 to 255. Returns the color space of the pixels. Paints the data from the given Pixel manipulation
-
imagedata = new ImageData(sw, sh [, settings])imageData = new ImageData(sw, sh [, settings])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 ] ])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)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])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])ImageData object containing the image data for the given rectangle of
the bitmap. The color space of the returned object is the
imagedata.widthimagedata.heightimageData.widthimageData.heightImageData object, in
pixels.imagedata.dataimageData.dataimagedata.colorSpaceimageData.colorSpacecontext.putImageData(imagedata, dx, dy [, dirtyX, dirtyY, dirtyWidth, dirtyHeight ])context.putImageData(imageData, dx, dy [, dirtyX, dirtyY, dirtyWidth, dirtyHeight ])ImageData object onto the bitmap. If a dirty
rectangle is provided, only the pixels from that rectangle are painted.
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.
The createImageData(imagedata)
+ data-x="dom-context-2d-createimagedata-imagedata">createImageData(imageData)
method steps are:
Let newImageData be a new ImageData object.
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.
colorSpace attribute.
Initialize the image data of newImageData to transparent black.
ImageData onto a bitmap, given
- imageData, the output bitmap of the rendering context,
+ imageData, this's output bitmap,
dx, dy, 0, 0,
- the width of
- the imageData structure, and
- the height of
- the imageData structure.
+ imageData's width, and
+ imageData's height.
The putImageData(imageData,
@@ -70249,7 +70247,7 @@ try {
dirtyWidth, dirtyHeight) method steps are to
put pixels from an
ImageData onto a bitmap, given
- imageData, the output bitmap of the rendering context,
+ imageData, this's output bitmap,
dx, dy, dirtyX, dirtyY,
dirtyWidth, and dirtyHeight.
ArrayBuffer,
converted from imageData's colorSpace