ImageEn, unit iexHelperFunctions

TImageEnIO.LoadFromBlobFast

TImageEnIO.LoadFromBlobFast


Declaration


function LoadFromBlobFast(aField: TBlobField;
                          iMaxX, iMaxY: integer;
                          bAutoAdjustOrientation: Boolean = False;
                          iImageIndex : Integer = -1
                          ): Boolean;


Description


Uses streams to load an image from the blob field of a database table 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

Note: You must define IE_DB_Helpers in iexHelperFunctions.pas to use this method


Example


// Load the image from the MyTableImageBlob field as fast as possible, but bigger than the displaying TImageEnView
ImageEnView1.AutoShrink := True;
ImageEnView1.IO.LoadFromBlobFast(MyTableImageBlob, ImageEnView1.Width, ImageEnView1.Height)