ImageEn, unit iexHelperFunctions

TIEBitmapHelper.WriteEx

TIEBitmapHelper.WriteEx


Declaration

function WriteEx(const Filename : string; JpegQuality : Integer; IOParams: TIOParams = nil): Boolean; overload;
function WriteEx(Stream: TStream; FileType: TIOFileType; JpegQuality : Integer; IOParams: TIOParams = nil): Boolean; overload;


Description

Allows a TIEBitmap to save to any format supported by ImageEn. If you are saving to JPEG you can also specify the JPEG_Quality.
For the stream overload, you must specify the file format.
You can optionally specify an TIOParams object containing the I/O parameters of the file.
Returns True if saving was successful, or False on error.

Note: You must add the iexHelperFunctions unit to your uses clause


Example

    // Save the image at 90% quality
MyIEBitmap.WriteEx(SavePictureDialog1.FileName, 90);

// Save the image at 90% quality
MyIEBitmap.WriteEx(DestStream, ioJPEG, 90);


Compatibility Information

Prior to v12.0.0, WriteEx was named: IESaveToFile(), IELoadFromFileFast(), IESaveToStream()