FMX.Graphics.TBitmap

From RAD Studio API Documentation
Jump to: navigation, search

System.Classes.TInterfacedPersistentSystem.Classes.TPersistentSystem.TObjectTBitmap

Delphi

TBitmap = class(TInterfacedPersistent, IStreamPersist)

C++

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

Properties

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

Description

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