Picture.HorizontalResolution

From Xojo Documentation

Property (As Integer )
aPicture.HorizontalResolution = newIntegerValue
or
IntegerValue = aPicture.HorizontalResolution

Supported for all project types and targets.

The horizontal resolution of the picture.

Notes

The horizontal resolution is established when you use the Open shared method and written out when using the Save method. When creating a picture, the default resolution is 72 (pixels).

fa-info-circle-32.png
To get the actual picture resolution for an opened picture file on Linux, gtk+ 2.32 or later is required.

Example

This example gets the horizontal and vertical resolution of the Picture that was opened:

Var pic As Picture
Var f As FolderItem
f = FolderItem.ShowOpenFileDialog("image/jpeg")
If f <> Nil Then
pic = Picture.Open(f)
ImageWell1.Image = pic
Label1.Value = pic.HorizontalResolution.ToString
Label2.Value = pic.VerticalResolution.ToString
End If