SaveToFileEncoded(FileName: String; Format: IGxImageFormat);
FileName. Name of the file, to which image will be saved.
Format. The format, in which 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 that the file system contains the C:\Map.bmp image.
Sub UserProc;
Var
Image: IGxImage;
Begin
Image := GxImage.FromFile("C:\Map.bmp");
Image.SaveToFileEncoded("C:\Map.jpeg", GxImageFormats.Jpeg);
End Sub UserProc;
After executing the example the specified image is saved in the JPEG format.
See also: