ImageEn, unit iexHelperFunctions




// Standard overload
function IELoadFromStream(Stream: TStream; FileType: TIOFileType = ioUnknown): Boolean; overload;

// Fast overload
function IELoadFromStreamEx(Stream: TStream; FileType: TIOFileType;
                            MaxX, MaxY: integer;
                            AutoAdjustOrientation: Boolean = False
                            ): Boolean;


Allows a TBitmap to load any format supported by ImageEn.
If you know the FileType type of the stream, pass it to speed up loading.
The fast overload allows you to load much faster by specifying the maximum size it is required. It uses OptimizeLoadingParams.
You can also set EnableAdjustOrientation to automatically re-orient JPEG camera images.
Returns True if loading was successful, or False on error.

Note: You must add the iexHelperFunctions unit to your uses clause


// Load MyImage.jpeg into a bitmap
MyBitmap.IELoadFromStream( MyStream );

// Load the specified image as fast as possible, but bigger than screen size
MyBitmap.IELoadFromStream( MyStream, ioUnknown, Screen.Width, Screen.Height );

Compatibility Information

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