ImageEn, unit imageenio

TImageEnIO.SaveToStream

TImageEnIO.SaveToStream


Declaration

procedure SaveToStream(Stream: TStream; FileType: TIOFileType);


Description

SaveToStream saves the image to a stream. You must specify the file format (if ioUnknown is specified, the current file type is used).

If StreamHeaders property is True, an additional special header is added, which is needed for multi-image streams.

Note: To abort while saving, set Aborting to true


Example

// Output current image to a TImage
Stream := TMemoryStream.Create;
ImageEnView1.IO.SaveToStream(Stream, ioBMP);
Stream.Position:= 0;
Image1.Picture.LoadFromStream(Stream);
Stream.Free;