API:FMX.Import.TGEBitmap.CreateFromFile

From RAD Studio API Documentation

Delphi

constructor CreateFromFile(const AFileName: string); override;

Properties

Type Visibility Source Unit Parent
constructor public FMX.Import.pas FMX.Import TGEBitmap

Description

Constructs a TBitmap object by loading its image content from a file specified by the AFileName parameter. {{#multireplace:FMX.Import.TGEBitmap.CreateFromFile|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}} inherits from {{#multireplace:FMX.Graphics.TBitmap.CreateFromFile|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}. All content below this line refers to {{#multireplace:FMX.Graphics.TBitmap.CreateFromFile|H21=!|H25=%|H28=(|H29=)|H2A=*|H2B=+|H2F=/|H3C=<|H3D==|H3E=>|H5B=[|H5D=]|H5E=^|H7C=|}}.

Constructs a TBitmap object by loading its image content from a file specified by the AFileName parameter.

If AFileName is not a valid bitmap image or it does not exist, the new TBitmap will be empty (with its dimensions equal to 0).

Note: For a list of formats supported by each platform, see TBitmapCodecManager.

See Also

Code Examples