LoadFromStream

Parent Previous Next

Procedure LoadFromStream(AStream : TStream) - Public

Call LoadFromStream to create a new image from the layers contained by AStream. If the current image is not empty, it is first emptied.

AStream mus contain a valid ImagePainter document format.

This is how to copy the content of one ImagePainter to another:

var
 MyStream : TMemoryStream;
begin
 MyStream := TMemoryStream.Create;
 try
    ImagePainter1.SaveToStream(MyStream);
    ImagePainter2.LoadFromStream(MyStream);
 finally
  MyStream.Free;
 end;
end;

See also
LoadFromClipboard procedure
LoadFromBitmap procedure
LoadFromFile procedure
SaveToStream procedure