Skip to content
Related Articles

Related Articles

Web ImageData API | ImageData.height property
  • Last Updated : 31 Jul, 2019

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
Recommended Articles
Page :