Load an image from a blob field, file or stream (of any format supported by the TImageEnIO 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 TIOParams object for the I/O parameters of the file (see also ParamsEnabled).
Returns False on failure.
// Extract an image from a database and save it MyBMP := TIEDBBitmap.Create(); MyBMP.Read( MyTableImageBlob ); MyBmp.Write( 'D:\MyBlobImage.jpeg' ); MyBmp.Free;
// Reduce the size of an image in the database MyBMP := TIEDBBitmap.Create(); MyBMP.Read( MyTableImageBlobField ); MyBmp.Resample( 800, 600, rfLanczos3, true); MyBmp.JpegQuality := 75; MyBmp.Write( MyTableImageBlobField, ioJPEG ); MyBmp.Free;