TIEMultiBitmap.SaveSnapshot
Declaration
procedure SaveSnapshot(Stream: TStream; Options: TIESaveSnapshotOptions = [iessoCompressed, iessoSaveIOParams]); overload;
procedure SaveSnapshot(const FileName: WideString; Options: TIESaveSnapshotOptions = [iessoCompressed, iessoSaveIOParams]); overload;
Description
Saves current object status (including images) to the specified stream or file.
Options:
Value | Description |
iessoCompressed | Compresses the snapshot stream to save space |
iessoSaveIOParams | Also saves all the I/O params of the images |
Use SaveSnapshot in combination with
LoadSnapshot.
Note: 32 and 64bit versions of your application cannot use Snapshot files interchangeably.
// Save
MBMP := TIEMultiBitmap.Create();
MBMP.AppendImage( 'D:\dicom.png' );
MBMP.AppendImage( 'D:\face.jpg' );
ShowMessage( IntToStr( MBMP.Count )); // Returns 2
MBMP.SaveSnapShot( 'D:\SnapShot.snp' );
FreeAndNil( MBMP );
// Load
MBMP := TIEMultiBitmap.Create();
MBMP.LoadSnapShot( 'D:\SnapShot.snp' );
ShowMessage( IntToStr( MBMP.Count )); // Returns 2
FreeAndNil( MBMP );