[Overview][Constants][Types][Classes][Procedures and functions][Variables][Index] | Reference for unit 'Graphics' (#lcl)

# TBitmap

[Properties (by Name)] [Methods (by Name)] [Events (by Name)]

TBitmap is the data of an image, and can be loaded from a file, stream or resource in .bmp or .xpm format

## Declaration

Source position: graphics.pp line 1449

`type TBitmap = class(TFPImageBitmap)`
`protected`
`procedure InitializeReader(); override;` |  | InitializeReader - starts up the specified reader to read th especified Image
`protected`
`class function GetReaderClass; override;` |  | GetReaderClass - returns the class of reader for acquiring data from a stream
`class function GetWriterClass; override;` |  | GetWriterClass - returns the class of writer for storing data to a stream
`class function GetSharedImageClass; override;` |  | GetSharedImageClass - returns the class of Shared Raster Image
`class function GetFileExtensions; override;` |  | GetFileExtensions - returns a list of the file extensions available
`public`
`procedure LoadFromStream(); override;` |  | LoadFromStream - loads data for the image from a specified data stream, optionally supplying its size
`end;`

## Inheritance

`TBitmap` |  | TBitmap is the data of an image, and can be loaded from a file, stream or resource in .bmp or .xpm format
`TFPImageBitmap` |  | A class of Bitmap using the FPImage reader and writer (ie customised for FreePascal)
`TCustomBitmap` |  | TCustomBitMap - the base class for TBitmap
`TRasterImage` |  | TRasterImage - base class for a number of graphic controls, including TCustomBitmap and TCustomIcon, which use a raster of dots to display graphic information
`TGraphic` |  | TGraphic - Base class for dealing with Graphic images
`TPersistent`
`TObject`

## Description

TBitmap is the data of an image. The image can be loaded from a file, stream or resource in .bmp (windows bitmap format) or .xpm (XPixMap format)

The loading routine automatically recognizes the format, so it is also used to load the images from Delphi form streams (e.g. .dfm files) or FreePascal/Lazarus form streams (.lfm)

When the handle is created, it is up to the interface (gtk, win32, ...) to convert it automatically to the best internal format. That is why the Handle is interface dependent.

To access the raw data, see TLazIntfImage

## See also

#lcl.IntfGraphics.TLazIntfImage |  | Represents a graphical image.

The latest version of this document can be found at lazarus-ccr.sourceforge.net .