ImageEn, unit iexBitmaps

TIOParams.LoadToWidth

TIOParams.LoadToWidth


Declaration

property LoadToWidth: integer;


Description

Specifies the minimum width for the image when loading.
Set LoadToWidth and LoadToHeight 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 if AutoScaleImport=True
- Importing Meta files if AutoScaleImport=True
- Loading ImageMagick files if AutoScaleImport=True

Notes:
- Set LoadToWidth and LoadToHeight to 0 to reset optimized loading
- ImageEn will consider the aspect ratio to ensure both LoadToWidth and LoadToHeight 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

- LoadToHeight
- OptimizeLoadingParams