TImageEnIO.LoadFromStreamIEN
Declaration
function LoadFromStreamIEN(Stream: TStream; Append: Boolean = False): Boolean;
Description
Loads an image from a stream containing a file in ImageEn's native format, which preserves the image and any layers.
The result will be false if an error is encountered, e.g. the file in the stream is not IEN format (
Aborting will be true).
If
Append is True, the existing content is not cleared, i.e. layers in this file will be added to existing layers.
Note:
◼You can abort loading by setting
Aborting to true
◼If the TImageEnIO is
attached to a TImageEnView then layers in the file will be loaded, if it is attached to a TIEBitmap or TBitmap then the file will be loaded as a merged image
◼LoadFromStreamIEN does not reset the position of the stream, so you may need to first call Stream.Position := 0;
// Save current layer configuration (compress images as PNG)
ImageEnView1.IO.Params.IEN_Compression := ioPNG;
ImageEnView1.IO.SaveToStreamIEN( Stream );
// Load saved layers
ImageEnView1.IO.LoadFromStreamIEN( Stream );
See Also
◼IEN_Description
◼GetThumbnail
◼LoadFromFileIEN
◼SaveToStreamIEN
◼LayersImport