ImageEn, unit iexHelperFunctions |
|
TImageEnIOHelper.LoadFromFileEx
Declaration
// Normal overload
function LoadFromFileEx(const Filename: string; AutoAdjustOrientation: Boolean; ImageIndex : Integer = -1): Boolean; overload;
// Fast loading overload
function LoadFromFileEx(const Filename: string; MaxX, MaxY: integer; AutoAdjustOrientation: Boolean = False): Boolean; overload;
function LoadFromFileEx(const Filename: string; MaxX, MaxY: integer; AutoAdjustOrientation: Boolean; out ScaleUsed: Integer): Boolean; overload;
Description
Calls
LoadFromFile, optionally setting
EnableAdjustOrientation to automatically re-orient JPEG camera images and
ImageIndex to display a specific image.
The fast overloads allow you to specify a maximum size that you require an image so that it can be loaded as fast as possible, by using
OptimizeLoadingParams.
Returns True if loading was successful, or False on error
Note: You must add the iexHelperFunctions unit to your uses clause
// Load the third page of MyImage.tiff
ImageEnView1.IO.LoadFromFileEx('D:\MyImage.tiff', False, 2);
// Load the image specified in an open dialog as fast as possible, but bigger than the displaying TImageEnView
ImageEnView1.AutoShrink := True;
ImageEnView1.IO.LoadFromFileEx(OpenPictureDialog1.FileName, ImageEnView1.Width, ImageEnView1.Height)
Compatibility Information
Prior to v12.0.0, the fast overloads were named LoadFromFileFast();