IGxImage.SaveToStream

Syntax

SaveToStream(Stream: IIOStream);

Parameters

Stream. The stream, to which the image will be loaded.

Description

The SaveToStream method saves the image to the stream transferred by input parameter.

Comments

The file is saved in the initial format. To change the format, use the SaveToStreamEncoded method. Use the RawFormat property to check the format.

Example

Sub Button1OnClick(Sender: Object; Args: IMouseEventArgs);
Var
    Image: IGxImage;
    Strem1: IIOStream;
Begin
    Strem1 := 
New MemoryStream.Create;
    Image := ImageBox1.Image;
    Image.SaveToStream(Strem1);
End Sub Button1OnClick;

Clicking the button saves the image stored in the component named ImageBox1 to the Stream1 stream.

See also:

IGxImage