YDPI Property

Returns the vertical or y-axis pixels per inch (dpi) for the specified image. Read-only Long.

expression.YDPI

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

Example

The following example returns the properties, including vertical dpi, 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