SaveToFileEncoded(FileName: String; Format: IGxImageFormat);
FileName - name of the file, to which the image is saved.
Format - format, to which the image should be saved.
The SaveToFileEncoded method saves the image to the file in the specified format.
The method enables the user to save images in the ICO and EMF formats.
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: