IGxImage.SaveToFileEncoded

Syntax

SaveToFileEncoded(FileName: String; Format: IGxImageFormat);

Parameters

FileName - name of the file, to which the image is saved.

Format - format, to which the image should be saved.

Description

The SaveToFileEncoded method saves the image to the file 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;

Begin

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

m_Image.SaveToFileEncoded("C:\Map.jpg", GxImageFormats.Jpeg);

End Sub Main;

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

See also:

IGxImage