Easy Tutorial
❮ Html Language Codes Tag Dl ❯

HTML Canvas ImageData width Property

HTML Canvas Reference Manual

Example

Output the width of the ImageData object:


Browser Support

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

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


Definition and Usage

The width property returns the width of the ImageData object in pixels.

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


JavaScript Syntax

| JavaScript Syntax: | imgData.width; | | --- | --- |

❮ Html Language Codes Tag Dl ❯