• Skip to main content
  • Skip to search
  • Skip to select language
    • Technologies Overview
    • HTML
    • CSS
    • JavaScript
    • Graphics
    • HTTP
    • APIs
    • Browser Extensions
    • MathML
    • Learn web development
    • Tutorials
    • References
    • Developer Guides
    • Accessibility
    • Game development
    • ...more docs
    • Send Feedback
    • Contribute to MDN
    • Report a content issue 🌐
    • Report a platform issue 🌐
  1. Web technology for developers
  2. Web APIs
  3. ImageData
  4. ImageData.height
  • Change language

Table of contents

  • Syntax
  • Example
  • Specifications
  • Browser compatibility
  • See also

ImageData.height

The readonly ImageData.height property returns the number of rows in the ImageData object.

Syntax

imageData.height

Example

This example creates an ImageData object that is 200 pixels wide and 100 pixels tall. Thus, the height property is 100.

let imageData = new ImageData(200, 100);
console.log(imageData.height);  // 100

Specifications

Specification
HTML Standard
# dom-imagedata-height-dev

Browser compatibility

BCD tables only load in the browser

See also

  • ImageData.width
  • ImageData

Found a problem with this page?

  • Edit on GitHub
  • Source on GitHub
  • Report a problem with this content on GitHub
  • Want to fix the problem yourself? See our Contribution guide.

Last modified: Sep 14, 2021, by MDN contributors

Change your language

Related Topics

  1. Canvas API
  2. ImageData
  3. Constructor
    1. ImageData()
  4. Properties
    1. data
    2. height
    3. width
  5. Related pages for Canvas API
    1. Canvas
    2. CanvasGradient
    3. CanvasImageSource
    4. CanvasPattern
    5. CanvasRenderingContext2D
    6. HTMLCanvasElement
    7. ImageBitmap
    8. ImageBitmapFactories
    9. ImageBitmapRenderingContext
    10. OffscreenCanvas
    11. Path2D
    12. TextMetrics
  • Web Technologies
  • Learn Web Development
  • About MDN
  • Feedback
  • About
  • MDN Web Docs Store
  • Contact Us
  • Firefox

MDN

  • MDN on Twitter
  • MDN on Github

Mozilla

  • Mozilla on Twitter
  • Mozilla on Instagram

© 2005-2022 Mozilla and individual contributors. Content is available under these licenses.

  • Terms
  • Privacy
  • Cookies