function CreateThumbnail(const AWidth, AHeight: Integer): TBitmap;
TBitmap* __fastcall CreateThumbnail(const int AWidth, const int AHeight);
Creates a thumbnail with specified dimensions for the current TBitmap object.
Width parameter is the width of the thumbnail.
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
- If any dimension of the current TBitmap image is larger than the specified
Heightparameters, 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 specified
Height. That is, either the width of the current scaled image is equal to the specified
Widthor the height of the current scaled image is equal to the specified
Height. All the current image should be placed into the rectangle having the specified
Height. The current image is drawn centered in the rectangle.
- If the original current image is smaller than a rectangle with the specified
Height, then the current image is not resized. The current image is drawn centered in the rectangle.