ImageEn, unit iexDBBitmaps |
|
TIEDBMultiBitmap.Read
Declaration
function Read(): boolean; overload;
function Read(aBlobField: TBlobField; FileType: TIOFileType = ioUnknown; IOParams: TIOMultiParams = nil): boolean; overload;
Description
Load an image from a blob field, file or stream (including all its frames) of any format supported by the
TImageEnMIO class.
The Read(); overload reads the image at the current database position using the properties of
DataSource,
ImageBlobField and/or
FilenameField.
When reading from a blob or stream you can optionally specify the
Format. If it is not specified ImageEn will determine the file type automatically.
You can optionally pass an
TIOMultiParams object for the I/O parameters of the file.
Returns
False on failure.
Note: Do NOT use this method when
Mode = dmAllRecords
// Extract an image from a database and save it
MBMP := TIEDBMultiBitmap.Create();
MBMP.Read( MyTableImageBlob );
MBMP.Write( 'D:\MyBlobImage.jpeg' );
MBMP.Free;
// Reduce the size of an image in the database
MBMP := TIEDBMultiBitmap.Create();
MBMP.Read( MyTableImageBlobField );
MBMP.Resample( 800, 600, rfLanczos3, true);
MBMP.JpegQuality := 75;
MBMP.Write( MyTableImageBlobField, ioJPEG );
MBMP.Free;
See Also
◼LoadImage◼Write◼WicFastLoading