ImageEn, unit iexHelperFunctions

TImageEnIOHelper.LoadFromStreamEx

TImageEnIOHelper.LoadFromStreamEx


Declaration

// Normal overload
function LoadFromStreamEx(Stream: TStream; FileType: TIOFileType = ioUnknown; AutoAdjustOrientation: Boolean; ImageIndex : Integer = -1): Boolean;

// Fast loading overload
function LoadFromStreamEx(Stream: TStream; FileType: TIOFileType = ioUnknown; MaxX, MaxY: integer; AutoAdjustOrientation: Boolean = False): Boolean; overload;
function LoadFromStreamEx(Stream: TStream; FileType: TIOFileType = ioUnknown; MaxX, MaxY: integer; AutoAdjustOrientation: Boolean; out ScaleUsed: Integer): Boolean; overload;


Description

Calls LoadFromStream, optionally setting EnableAdjustOrientation to automatically re-orient JPEG camera images and ImageIndex to display a specific image.
If you know the FileType type of the stream, pass it to speed up loading.
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


Example

// Load the third page of a TIFF stream
ImageEnView1.IO.LoadFromStreamEx(MyStream, False, 2);

// Load an image as fast as possible, but bigger than the displaying TImageEnView
ImageEnView1.AutoShrink := True;
ImageEnView1.IO.LoadFromStreamFast( MyStream, ImageEnView1.Width, ImageEnView1.Height )


Compatibility Information

Prior to v12.0.0, the fast overloads were named LoadFromStreamFast();