PixelHeight Property

Returns the height in pixels of the specified image. Read-only Long.

expression.PixelHeight

*expression   * Required. An expression that returns an Image object.

Example

The following example returns the properties, including height in pixels, of the first image in the active document.

Sub TestImageProperties()

  Dim img As MODI.Image
  Dim strImageInfo As String
  
  Set img = miDoc.Images(0)
  
  strImageInfo = "Bits per pixel: " & img.BitsPerPixel & vbCrLf & _
    "Compression: " & img.Compression & vbCrLf & _
    "Pixel height: " & img.PixelHeight & vbCrLf & _
    "Pixel width: " & img.PixelWidth & vbCrLf & _
    "Horizontal DPI: " & img.XDPI & vbCrLf & _
    "Vertical DPI: " & img.YDPI
  MsgBox strImageInfo, vbInformation + vbOKOnly, _
    "Image Information"
  
  Set img = Nothing

End Sub

Applies to | Image Object