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

TBitmap

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

Implements a FCL-compatible reader/writer for a Bitmap image.

Declaration

Source position: graphics.pp line 1473

type TBitmap = class(TFPImageBitmap)

protected

  procedure InitializeReader(); override;

  

Initializes the image reader to use the transparency settings in the class instance.

  class function GetReaderClass; override;

  

Gets the class reference used to create the FCL-compatible reader for the image.

  class function GetWriterClass; override;

  

Gets the class reference used to create instances of the FCL-compatible image writer.

  class function GetSharedImageClass; override;

  

Gets the class reference used to create new instances of a shared image.

public

  class function GetFileExtensions; override;

  

Gets the file extensions supported for the image type.

  function GetResourceType; override;

  

Gets the resource type identifier for the image format.

  procedure LoadFromStream(); override;

  

Loads image data for the bitmap from the specified stream.

end;

Inheritance

TBitmap

  

Implements a FCL-compatible reader/writer for a Bitmap image.

|

TFPImageBitmap

  

Implements a Bitmap using the FPImage reader and writer from the FCL.

|

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

  

Abstract base class used for images in supported image formats.

|

TPersistent,IFPObserved

|

TObject

Description

TBitmap is a TFPImageBitmap descendant which represents the data for a Bitmap image. The image can be loaded from a file, stream or resource which uses .bmp (windows bitmap) format.

TBitmap provides overridden methods which get the image reader (TLazReaderBMP) and writer (TLazWriteBMP) class references, as well as the shared image storage class (TSharedBitmap).

An overridden LoadFromStream method is provided which handles reading the BMP header using the correct endian-ness for the platform. 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 for the image is created, it is up to the interface (GTK, QT, Win32,etc.) to convert it automatically to the best internal format for the widgetset. That is why the Handle is interface dependent.

To access the raw image data, see TLazIntfImage.

Remark: Please note that the current implementation is dramatically different than previous LCL implementations. Most of the low-level functionality for TBitmap has been refactored into ancestor or descendent classes.

See also

TFPImageBitmap

  

Implements a Bitmap using the FPImage reader and writer from the FCL.

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

  

Abstract base class used for images in supported image formats.

TSharedBitmap

  

Defines a reference-counted shared Bitmap graphic.

TLazIntfImage

  

Represents a graphical image.

TLazReaderBMP

  

TLazReaderBMP - This is an improved FPImage reader for bmp images.

TLazWriterBMP

  


Version 3.2 Generated 2024-02-25 Home