ImageEn, unit iexBitmaps

TIOParams.DpiY

TIOParams.DpiY


Declaration

property DpiY: integer;


Description

Specifies the vertical Dpi (dots per inch) of the image.


Calculating DPI

The formulas for DPI are as follows:

dpiX := widthPixels div widthInches;
dpiY := heightPixels div heightInches;

widthPixels := widthInches * dpiX ;
heightPixels := heightInches * dpiY;

widthInches := widthPixels div dpiX ;
heightInches := heightPixels div dpiY;


Examples

// Show the height of the current image in inches/mm
lblHeight.Caption := IntToStr( Trunc( ImageEnView1.IO.Params.Height / ImageEnView1.IO.Params.DpiY )) + ' inches';
lblHeight.Caption := IntToStr( Trunc( ImageEnView1.IO.Params.Height / ImageEnView1.IO.Params.DpiY * 25.4 )) + ' mm';

// Set image dimensions to 8.5 x 11.7"
ImageEnView1.IO.Params.DpiX := Round( ImageEnView1.IO.Params.Width / 8.5 );
ImageEnView1.IO.Params.DpiY := Round( ImageEnView1.IO.Params.Height / 11.7 );


See Also

 Dpi
 DpiX
 ScaleX
 ScaleY
 SetScale