ImageEn, unit iexHelperFunctions

TImageEnIO.LoadFromFileJPEGFast

TImageEnIO.LoadFromFileJPEGFast


Declaration


function LoadFromFileJPEGFast(const sFilename: string;
                              iMaxX, iMaxY: integer;
                              var iFastScaleUsed: Integer;
                              bAutoAdjustOrientation: Boolean = False
                              ): Boolean;


Description


Calls LoadFromFileJpeg 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 specified in an open dialog as fast as possible, but bigger than the displaying TImageEnView
ImageEnView1.AutoShrink := True;
ImageEnView1.IO.LoadFromFileJpegFast(OpenPictureDialog1.FileName, ImageEnView1.Width, ImageEnView1.Height, iFastScaleUsed)