Declaration
function SaveToStream(Stream: TStream; ImageFormat: TIOFileType): boolean;
Description
Saves the image to a stream (in any format supported by the
TImageEnIO class).
You must specify the
ImageFormat.
Returns true on success.
Note:
◼TIEBitmap only supports saving of a single frame image. To load and save images containing multiple frames, use
TIEMultiBitmap
◼For legacy reasons, SaveToStream() is an alias of Write()
// Output current image to a TImage
bmp := TIEBitmap.Create();
Stream := TMemoryStream.Create();
bmp.LoadFromFile( 'D:\image.webp' );
bmp.SaveToStream( Stream, ioBMP );
Stream.Position := 0;
Image1.Picture.LoadFromStream( Stream );
Stream.Free();
bmp.Free();
See Also
◼SaveToFile
◼LoadFromFile
◼Filename
◼IO