FMX.Graphics.TBitmapCodecManager.LoadThumbnailFromFile
Delphi
class function LoadThumbnailFromFile(const AFileName: string; const AFitWidth, AFitHeight: Single;
const AUseEmbedded: Boolean; const ABitmap: TBitmapSurface): Boolean;
C++
__classmethod bool __fastcall LoadThumbnailFromFile(const System::UnicodeString AFileName, const float AFitWidth, const float AFitHeight, const bool AUseEmbedded, Fmx::Surfaces::TBitmapSurface* const ABitmap);
Properties
Type | Visibility | Source | Unit | Parent |
---|---|---|---|---|
function | public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TBitmapCodecManager |
Description
Loads a TBitmap thumbnail from a file.
LoadThumbnailFromFile is an abstract method. The TBitmapCodecManager's descendants override it to decode and load a thumbnail from a file specified by the AFileName
parameter and with the specified sizes.
The AFitWidth
parameter specifies the Width of the thumbnail.
The AFitHeight
parameter specifies the Height of the thumbnail.
The new image is written to TBitmap, which is specified by the Bitmap
parameter.
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.
LoadThumbnailFromFile returns True if the thumbnail was loaded, and False otherwise.
When calling LoadThumbnailFromFile, the method of the proper decoder will be called automatically.