ImageEn, unit iexHelperFunctions |
|
TImageEnIO.LoadFromStreamFast
Declaration
function LoadFromStreamFast(Stream: TStream; FileType: TIOFileType = 0; MaxX, MaxY: integer; AutoAdjustOrientation: Boolean = False): Boolean; overload;
function LoadFromStreamFast(Stream: TStream; FileType: TIOFileType = 0; MaxX, MaxY: integer; AutoAdjustOrientation: Boolean; out FastScaleUsed: Integer): Boolean; overload;
Description
Calls
LoadFromStream and allows you to specify a maximum size that you require an image so that it can be loaded as fast as possible, by using
OptimizeLoadingParams.
You can also set
EnableAdjustOrientation to automatically re-orient JPEG camera images.
If you know the
FileType type of the stream, pass it to speed up loading.
Returns True if loading was successful, or False on error
Example
// Load an image as fast as possible, but bigger than the displaying TImageEnView
ImageEnView1.AutoShrink := True;
ImageEnView1.IO.LoadFromStreamFast( MyStream, ImageEnView1.Width, ImageEnView1.Height )