ImageEn, unit imageenio




procedure SaveToFileIEN(const FileName: WideString);


Saves the current image in the connected TImageEnView to a file in ImageEn's native format, which preserves the image and any layers.

FileName is the file name including extension.

- An exception will be raised if the TImageEnIO is not attached to a TImageEnView
- If an internal save error is encountered Aborting will return true. Saving issues due to insufficient write permissions and disk write failures will raise an exception.
- IEN_Compression cannot be ioTIFF.
- You can also save layers in PSD, PDF and SVG format


// Save current layer configuration (compress images as jpeg)
ImageEnView1.IO.Params.IEN_Compression := ioJPEG;
ImageEnView1.IO.SaveToFileIEN( 'D:\layers.ien' );

// Load saved layers
ImageEnView1.IO.LoadFromFileIEN( 'D:\layers.ien' );

// Save annotations only (don't include background image or thumbnail)
ImageEnView1.IO.Params.IEN_StoreBackground := False;
IEGlobalSettings().ThumbnailSize := 0;
ImageEnView1.IO.SaveToFile( 'D:\annot.ien' );

See Also

- IEN_Compression
- IEN_Description
- LoadFromFileIEN
- SaveToStreamIEN
- LayersSaveMergedTo