ImageData.height

The readonly ImageData.height property returns the number of rows in the ImageData object.

Syntax

imageData.height

Example

This example creates an ImageData object that is 200 pixels wide and 100 pixels tall. Thus, the height property is 100.

let imageData = new ImageData(200, 100);
console.log(imageData.height);  // 100

Specification

Specification Status Comment
HTML Living Standard
The definition of 'ImageData.height' in that specification.
Living Standard Initial definition.

Browser compatibility

Update compatibility data on GitHub
DesktopMobile
ChromeEdgeFirefoxInternet ExplorerOperaSafariAndroid webviewChrome for AndroidEdge MobileFirefox for AndroidOpera for AndroidiOS SafariSamsung Internet
Basic supportChrome Full support YesEdge Full support 12Firefox Full support 14IE Full support 9Opera Full support 9Safari Full support 3.1WebView Android Full support YesChrome Android Full support YesEdge Mobile Full support YesFirefox Android Full support 14Opera Android Full support YesSafari iOS Full support YesSamsung Internet Android Full support Yes

Legend

Full support  
Full support

See also

 

Document Tags and Contributors

Contributors to this page: mfluehr, fscholz, libbymc, jpmedley
Last updated by: mfluehr,