ImageEn, unit iexBitmaps

TIOParams.LoadToHeight

TIOParams.LoadToHeight


Declaration

property LoadToHeight: integer;


Description

Specifies the minimum height for the image when loading.
Set LoadToHeight and LoadToWidth to the display size for this image and it will be loaded more quickly when:
- Loading JPEG and JPEG_Scale=ioJPEG_AUTOCALC
- Loading JPEG2000 and J2000_Reduce=-1
- Loading PDF files
- Importing Meta files
- Loading ImageMagick files if AutoScaleImport=True

Note:
- Set LoadToHeight and LoadToWidth to 0 to reset optimized loading
- ImageEn will consider the aspect ratio to ensure both LoadToHeight and LoadToWidth exceed the minimum specified values (so the final size will generally be larger than the specified values)

Default: 0


Examples

// Load a JPEG as fast as possible, ensuring width is >= 150 and height >= 100 (while maintaining the aspect ratio)
ImageEnView1.IO.Params.LoadToWidth := 150;
ImageEnView1.IO.Params.LoadToHeight := 100;
ImageEnView1.IO.Params.JPEG_Scale := ioJPEG_AUTOCALC;
ImageEnView1.IO.LoadFromFile('C:\myimage.jpg');

// Load a JPEG2000 image as fast as possible, ensuring width is >= 150 and height >= 100 (while maintaining the aspect ratio)
ImageEnView1.IO.Params.LoadToWidth := 150;
ImageEnView1.IO.Params.LoadToHeight := 100;
ImageEnView1.IO.Params.J2000_Reduce := -1; // auto-calc
ImageEnView1.LoadFromFile('image.jp2');

// Load an SVG at size 2000x1000px
ImageEnView1.IO.Params.AutoScale := True;
ImageEnView1.IO.Params.LoadToWidth := 2000;
ImageEnView1.IO.Params.LoadToHeight := 1000;
ImageEnView1.IO.LoadFromFile( 'D:\SVG\Lion.svg' );


See Also

- LoadToWidth
- OptimizeLoadingParams