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
Width
orHeight
parameters, 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 specifiedWidth
andHeight
. That is, either the width of the current scaled image is equal to the specifiedWidth
or the height of the current scaled image is equal to the specifiedHeight
. All the current image should be placed into the rectangle having the specifiedWidth
andHeight
. The current image is drawn centered in the rectangle. - If the original current image is smaller than a rectangle with the specified
Width
andHeight
, then the current image is not resized. The current image is drawn centered in the rectangle.