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