IGxImage.SaveToStreamEncoded

Syntax

SaveToStreamEncoded(Stream: IIOStream; Format: IGxImageFormat);

Parameters

Stream - stream, to which the image is saved.

Format - format, to which the 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 the image C:/Map.bmp in the file system.

Sub Main;

Var

m_Image: IGxImage;

Stream1: IIOStream;

Begin

Strem1 := New MemoryStream.Create;

m_Image := GxImage.FromFile("C:\Map.bmp");

m_Image.SaveToStreamEncoded(Stream1, GxImageFormats.Jpeg);

End Sub Main;

After executing the example the image C:Map.bmp is saved to the Stream1 stream in the JPEG format.

See also:

IGxImage