HTML canvas ImageData heightProperty

Canvas 对象参考手册Canvas Object

Examples

Output the height of the ImageData object:

alert("Height of imgData is: " + imgData.height);

Try it Yourself »

Browser Support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

Internet Explorer 9, Firefox, Opera, Chrome, and Safari support the ImageData height property.

Note:Internet Explorer 8 and earlier versions do not support the <canvas> element.


Definition and Usage

The height property returns the height of the ImageData object, in pixels.

Tip:Please refer to thecreateImageData()、 getImageData()andputImageData()method to gain more knowledge about the ImageData object.


JavaScript Syntax

JavaScript Syntax: imgData.height;


Canvas 对象参考手册Canvas Object

Other Extensions