Show: Delphi C++
Display Preferences


From RAD Studio API Documentation
Jump to: navigation, search



TBitmap = class(TInterfacedPersistent, IStreamPersist)


class PASCALIMPLEMENTATION TBitmap : public System::Classes::TInterfacedPersistent


Type Visibility Source Unit Parent
class public
FMX.Graphics FMX.Graphics


TBitmap is an encapsulation of a bitmap.

A TBitmap is a powerful graphics object used to create, manipulate and store images in memory and as files on a disk. TBitmap contains an internal image of the bitmap graphic and automatically manages realization of the palette when drawn. It also has an internal Canvas.

A TBitmap can be created from a stream or a file specified by name using CreateFromStream and CreateFromFile. The image contained by the current TBitmap can be loaded or saved from or to specified streams or files. For a list of formats supported by each platform, see TBitmapCodecManager.

TBitmap encapsulates basic methods for geometric and color manipulation: Rotate, FlipHorizontal, FlipVertical, InvertAlpha, ReplaceOpaqueColor. To directly access the bitmap data use Map and Unmap methods. The access to the bitmap data can be made for only read, only write, or read and write. To get information about internal format of bitmap's pixels, use the PixelFormat property. The attributes of bitmap data are specified trough TBitmapData record. Map gets specified access to a TBitmapData, and returns True if it succeeds. After calling Map call Unmap. FMX.Types.TPixelFormat contains routines to manipulate pixels as TAlphaColor.

The controls that contain and manipulate a TBitmap, like TImage, implement the IBitmapObject interface to get access to the contained bitmap.

See Also

Personal tools
RAD Studio 10.2 Tokyo
In Other Languages
Previous Versions