Private archive copy · Unofficial site · Content copyright belongs to Runoob Tutorial and the original authors · View Original

HTML canvas ImageData height attribute

HTML canvas ImageData height attribute

HTML canvas Reference HTML canvas Reference Manual

Example

Output the height of the ImageData object:

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

Try it »


Browser support

Internet ExplorerFirefoxOperaGoogle ChromeSafari

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

**Note:** Internet Explorer 8 and earlier versions do not support .


Definition and Usage

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

**Tip:** See the createImageData(), getImageData() and putImageData() method, for more information about the ImageData object.


JavaScript syntax

JavaScript syntax: imgData.height;

HTML canvas Reference HTML canvas Reference Manual