Skip to content
Related Articles
Open in App
Not now

Related Articles

Web ImageData API | ImageData.height property

Improve Article
Save Article
  • Last Updated : 31 Jul, 2019
Improve Article
Save Article

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.




<!DOCTYPE html> 
        Web ImageData API | ImageData.height property
<body style="text-align:center;">
    <h1 style="color:green;"
    <h2>ImageData height property</h2>
    <button onclick="getheight();">
        Get height
    <p id='height'></p>
    <script type="text/javascript">
        function getheight () {
        let imageData = new ImageData(100, 100);
                    = imageData.height;


  • 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

My Personal Notes arrow_drop_up
Related Articles

Start Your Coding Journey Now!