Declaration
property DpiX: integer;
Description
Specifies the horizontal DPI (dots per inch) of the image.
The DPI is set when loading images. Otherwise it defaults to:
◼https://www.imageen.com/help/TIEGlobalSettings.DefaultDpiX.html
◼https://www.imageen.com/help/TIEGlobalSettings.DefaultDpiY.html
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;
// Show the width of the current image in inches/mm
lblWidth.Caption := IntToStr( Trunc( ImageEnView1.IO.Params.Width / ImageEnView1.IO.Params.DpiX )) + ' inches';
lblWidth.Caption := IntToStr( Trunc( ImageEnView1.IO.Params.Width / ImageEnView1.IO.Params.DpiX * 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
◼DpiY
◼ScaleX
◼ScaleY
◼SetScale