FMX.Graphics.TBitmap.CreateThumbnail

From RAD Studio API Documentation
Jump to: navigation, search

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 or Height 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 specified Width and Height. That is, either the width of the current scaled image is equal to the specified Width or 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 Width and Height. The current image is drawn centered in the rectangle.
    IwFit
  • If the original current image is smaller than a rectangle with the specified Width and Height, then the current image is not resized. The current image is drawn centered in the rectangle.
    IwFit

See Also