XDPI Property

Returns the horizontal or x-axis pixels per inch (dpi) of the specified image. Read-only Long.

expression.XDPI

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

Example

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