FMX.Graphics.TBitmap.LoadThumbnailFromFile
Delphi
procedure LoadThumbnailFromFile(const AFileName: string; const AFitWidth, AFitHeight: Single; const UseEmbedded: Boolean = True);
C++
void __fastcall LoadThumbnailFromFile(const System::UnicodeString AFileName, const float AFitWidth, const float AFitHeight, const bool UseEmbedded = true);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
procedure function |
public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TBitmap |
Description
Loads a thumbnail specified by the AFileName
parameter and with specified dimensions from a file.
The AFitWidth
parameter specifies the width of the thumbnail.
The AFitHeight
parameter specifies the height of the thumbnail.
UseEmbedded
indicates the use of an existing thumbnail. If UseEmbedded
is True and AFileName
has a thumbnail, then the existing thumbnail of the file is used. In this case, AFitWidth
and AFitHeight
are ignored. If no thumbnail is found, then one is generated with the specified size. If UseEmbedded
is False, a thumbnail is generated with the specified size.
Note: Before loading from file, call a TBitmap constructor if the bitmap is not initialized by other components. If the file is not found or it does not exist, the new TBitmap will be empty.