FMX.Graphics.TBitmap.CreateThumbnail
Delphi
function CreateThumbnail(const AWidth, AHeight: Integer): TBitmap;
C++
TBitmap* __fastcall CreateThumbnail(const int AWidth, const int AHeight);
Properties
| Type | Visibility | Source | Unit | Parent |
|---|---|---|---|---|
| function | public | FMX.Graphics.pas FMX.Graphics.hpp |
FMX.Graphics | TBitmap |
Description
Creates a thumbnail with specified dimensions for the current TBitmap object.
The Width parameter is the width of the thumbnail.
The Height parameter is the height of the thumbnail.
Use CreateThumbnail to create reduced-size versions of a TBitmap image.
CreateThumbnail resizes the dimensions of the current TBitmap image to best fit (keeping the current image proportions) into a thumbnail with the specified Width and Height parameters:
- If any dimension of the current TBitmap image is larger than the specified
WidthorHeightparameters, then decrease the current image size (keeping current image proportions--the ratio between the width and height) to fit all the current image in the rectangle with the specifiedWidthandHeight. That is, either the width of the current scaled image is equal to the specifiedWidthor the height of the current scaled image is equal to the specifiedHeight. All the current image should be placed into the rectangle having the specifiedWidthandHeight. The current image is drawn centered in the rectangle. - If the original current image is smaller than a rectangle with the specified
WidthandHeight, then the current image is not resized. The current image is drawn centered in the rectangle.

