IGxImage.PhysicalDimension

Syntax

PhysicalDimension: IGxSizeF;

Description

The PhysicalDimension property returns image size in pixels per inch.

Example

Executing the example requires a form that contains a button named Button1 and the ImageBox component named ImageBox1. An image is loaded to the ImagBox1 component.

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Image: IGxImage;
    Size: IGxSizeF;
Begin
    Image := ImageBox1.Image;
    Size := Image.PhysicalDimension;
    Debug.WriteLine("Width: " + Size.Width.ToString + ". Height: " + Size.Height.ToString);
End Sub Button1OnClick;

On clicking the button the Size variable contains size of the image loaded to the ImageBox1 component. Width and height are displayed in the development environment console.

See also:

IGxImage