FMX.Graphics.TBitmapCodecManager.SaveToStream
Delphi
class function SaveToStream(const AStream: TStream; const ABitmap: TBitmapSurface; const AExtension: string;
const ASaveParams: PBitmapCodecSaveParams = nil): Boolean; overload;
C++
__classmethod bool __fastcall SaveToStream(System::Classes::TStream* const AStream, Fmx::Surfaces::TBitmapSurface* const ABitmap, const System::UnicodeString AExtension, const PBitmapCodecSaveParams ASaveParams = (PBitmapCodecSaveParams)(0x0))/* overload */;
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TBitmapCodecManager |
Description
Saves a TBitmap to a stream.
SaveToStream is an abstract method. The TBitmapCodecManager's descendants override it to encode and save a TBitmap content image to a stream specified by the AStream
parameter.
The Format
parameter specifies the extension of the saved image.
Bitmap
specifies the TBitmap from where to save the image.
When calling SaveToStream, the method of the proper encoder will be called automatically.
Note: For a list of formats supported by each platform, see TBitmapCodecManager.