SaveToStreamEncoded(Stream: IIOStream; Format: IGxImageFormat);
Stream. The stream, to which the image will be saved.
Format. The format, in which image should be saved.
The SaveToStreamEncoded method saves the image to the stream 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;
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: