ImageEn, unit iexHelperFunctions

TImageEnIO.LoadFromStreamJPEGFast

TImageEnIO.LoadFromStreamJPEGFast


Declaration


function LoadFromStreamJPEGFast(Stream: TStream;
                                iMaxX, iMaxY: integer;
                                var iFastScaleUsed: Integer;
                                bAutoAdjustOrientation: Boolean = False
                                ): Boolean;


Description


Calls LoadFromStreamJpeg to load a JPEG image 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
Returns True if loading was successful, or False on error. iFastScaleUsed is set with the scaling that was used, i.e. 1 = loaded full size, 2 = loaded at half size, etc.


Example


// Load the JPEG from a stream as fast as possible, but bigger than the displaying TImageEnView
ImageEnView1.AutoShrink := True;
ImageEnView1.IO.LoadFromStreamJpegFast(MyStream, ImageEnView1.Width, ImageEnView1.Height, iFastScaleUsed)