ICanvasRenderingContext2D.GetImageData

ICanvasRenderingContext2D.GetImageData method

Returns an ImageData object representing the underlying pixel data for the area of the canvas denoted by the rectangle which starts at (sx, sy) and has an sw width and sh height. This method is not affected by the canvas transformation matrix.

public IImageData GetImageData(double sx, double sy, double sw, double sh)
ParameterTypeDescription
sxDoubleThe x coordinate of the upper left corner of the rectangle from which the ImageData will be extracted.
syDoubleThe y coordinate of the upper left corner of the rectangle from which the ImageData will be extracted.
swDoubleThe width of the rectangle from which the ImageData will be extracted.
shDoubleThe height of the rectangle from which the ImageData will be extracted.

Return Value

An ImageData object containing the image data for the given rectangle of the canvas.

See Also