TBitmap class
Implements a FCL-compatible reader/writer for a Bitmap image.
Declaration
TBitmap = class(TFPImageBitmap)Inheritance
- TBitmap
- TFPImageBitmap
- TCustomBitmap
- TRasterImage
- TGraphic
TPersistent
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.
See also
Methods
InitializeReader | protected | Initializes the image reader to use the transparency settings in the class instance. |
GetReaderClass | protected | Gets the class reference used to create the FCL-compatible reader for the image. |
GetWriterClass | protected | Gets the class reference used to create instances of the FCL-compatible image writer. |
GetSharedImageClass | protected | Gets the class reference used to create new instances of a shared image. |
GetFileExtensions | public | Gets the file extensions supported for the image type. |
GetResourceType | public | Gets the resource type identifier for the image format. |
LoadFromStream | public | Loads image data for the bitmap from the specified stream. |
Inherited
From TFPImageBitmap (9)
FinalizeReader FinalizeWriter GetMimeType InitializeWriter IsFileExtensionSupported IsStreamFormatSupported LazarusResourceTypeValid ReadStream WriteStream
From TCustomBitmap (35)
Assign BitmapHandleAllocated CanShareImage Changed Clear Create CreateDefaultBitmapHandle Destroy FreeImage FreeMaskHandle GetBitmapHandle GetMaskHandle GetPalette GetPixelFormat GetRawImageDescriptionPtr GetRawImagePtr Handle HandleNeeded HandleType InternalReleaseBitmapHandle InternalReleaseMaskHandle InternalReleasePalette MaskHandleAllocated MaskHandleNeeded Monochrome PaletteAllocated PaletteNeeded RawimageNeeded ReleaseHandle SetHandle SetHandles SetPixelFormat SetSize UnshareImage UpdateHandles
From TRasterImage (46)
ApplyTransparent BeginUpdate BitmapHandle BitmapHandleNeeded Canvas CreateIntfImage Draw EndUpdate FreeSaveStream GetEmpty GetHandle GetHeight GetMasked GetSize GetSupportedSourceMimeTypes GetTransparent GetWidth HandleAllocated LoadFromBitmapHandles LoadFromDevice LoadFromIntfImage LoadFromMimeStream LoadFromRawImage Mask Masked MaskHandle PixelFormat RawImage ReadData ReleaseBitmapHandle ReleaseMaskHandle ReleasePalette RequestTransparentColor SaveStreamNeeded SaveToStream ScanLine SetBitmapHandle SetHeight SetMasked SetMaskHandle SetTransparent SetTransparentMode SetWidth TransparentColor TransparentMode WriteData
From TGraphic (24)
DefineProperties Empty Equals Height LoadFromClipboardFormat LoadFromClipboardFormatID LoadFromFile LoadFromLazarusResource LoadFromResourceID LoadFromResourceName MimeType Modified OnChange OnProgress Palette PaletteModified Progress SaveToClipboardFormat SaveToClipboardFormatID SaveToFile SetModified SetPalette Transparent Width
An experiment, built from Lazarus main 2dfa93c66e of 10-22-2026. Not the official Lazarus documentation.
