Web ImageData API | ImageData.height property
The ImageData.height property is used to return the height attribute of ImageData object. The ImageData() is used to create an object of given size.
Syntax:
imageData.height
Example:
<!DOCTYPE html> <html> <head> <title> Web ImageData API | ImageData.height property </title> </head> <body style="text-align:center;"> <h1 style="color:green;"> GeeksForGeeks </h1> <h2>ImageData height property</h2> <button onclick="getheight();"> Get height </button> <p id='height'></p> <script type="text/javascript"> function getheight () { let imageData = new ImageData(100, 100); document.getElementById('height').innerHTML = imageData.height; } </script> </body> </html> |
chevron_right
filter_none
Output:
- Before Click the Button:

- After Click the Button:

Supported Browsers: The browsers supported by Web API ImageData | ImageData.height property are listed below:
- Google Chrome
- Internet Explorer 9
- Firefox 14
- Safari 3.1
- Opera 9
Recommended Posts:
- Web ImageData API | ImageData.data property
- Web ImageData API | ImageData.width property
- HTML | canvas ImageData width Property
- HTML | canvas ImageData data Property
- HTML | canvas ImageData height Property
- CSS | transition-property Property
- CSS | nav-right property
- CSS | all Property
- CSS | nav-down property
- CSS | nav-up property
- CSS | right Property
- CSS | top Property
- CSS | transition Property
- CSS | perspective Property
- CSS | clip Property
If you like GeeksforGeeks and would like to contribute, you can also write an article using contribute.geeksforgeeks.org or mail your article to contribute@geeksforgeeks.org. See your article appearing on the GeeksforGeeks main page and help other Geeks.
Please Improve this article if you find anything incorrect by clicking on the "Improve Article" button below.



