ImageData.width

The readonly ImageData.width property returns the number of pixels per row in the image data object.

Syntax

imagedata.width

Example

var imagedata = new ImageData(100, 100);
imagedata.width // 100

Specification

Specification Status Comment
HTML Living Standard
The definition of 'ImageData.width' 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: fscholz, libbymc, jpmedley
Last updated by: fscholz,