IGxImage.SaveToStreamEncoded

Syntax

SaveToStreamEncoded(Stream: IIOStream; Format: IGxImageFormat);

Parameters

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

Format. The format, in which image should be saved.

Description

The SaveToStreamEncoded method saves the image to the stream in the specified format.

Comments

The method enables the user to save images in the ICO and EMF formats.

Example

Executing the example requires that the file system contains the C:\Map.bmp image.

Sub UserProc;
Var
    Image: IGxImage;
    Stream1: IIOStream;
Begin
    Strem1 := New MemoryStream.Create;
    Image := GxImage.FromFile("C:\Map.bmp");
    Image.SaveToStreamEncoded(Stream1, GxImageFormats.Jpeg);
End Sub UserProc;

After executing the example the specified image is saved to the Stream1 stream in the JPEG format.

See also:

IGxImage