IGxImage.SaveToStream

Syntax

SaveToStream(Stream: IIOStream);

Parameters

Stream - stream, to which the image is saved.

Description

The SaveToStream method saves image to the stream that is passed by the Stream 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;

After executing the example clicking the button saves the image that is stored in the component named ImageBox1 to the Stream stream.

See also:

IGxImage