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

# TSharedCustomBitmap

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

Implements the base class for a reference-counted shared image.

## Declaration

Source position: graphics.pp line 1345

`type TSharedCustomBitmap = class(TSharedRasterImage)`
`protected`
`procedure FreeHandle; override;` |  | Frees the Handle and the Palette for the shared Bitmap.
`procedure FreePalette;` |  | Frees the handle in the Palette property.
`procedure FreeImage;` |  | Frees raw image data for the shared bitmap and resets its image descriptor.
`function ReleasePalette;` |  | Returns the Handle of the released Palette.
`function GetPixelFormat;` |  | Gets the value for the PixelFormat property.
`function IsEmpty; override;` |  | Determines if the shared bitmap is empty.
`public`
`constructor Create; override;` |  | Create - constructor for TSharedCustomBitmap: calls inherited Create and initializes the image.
`destructor Destroy; override;` |  | Destructor for the class instance.
`function HandleAllocated; override;` |  | Determines if the handle for the shared bitmap has been allocated.
`function ImageAllocated;` |  | ImageAllocated - returns True if an image has been allocated.
`property HandleType: TBitmapHandleType; [rw]` |  | HandleType the type of Bitmap Handle that has been allocated.
`property Height: Integer; [r]` |  | The Height of the Bitmap.
`property PixelFormat: TPixelFormat; [r]` |  | Storage format for pixels in the raw image data.
`property Width: Integer; [r]` |  | The Width of the Bitmap.
`end;`

## Inheritance

`TSharedCustomBitmap` |  | Implements the base class for a reference-counted shared image.
`TSharedRasterImage` |  | Implements a reference counted raster image that may be shared between controls.
`TSharedImage` |  | Specifies the base class for reference-counted shared images.
`TObject`

## Description

TSharedCustomBitmap is a TSharedRasterImage descendant which implements the base class for reference-counted shared images, like: TSharedBitmap, TSharedPixmap, TSharedJPEGImage, TSharedPortableNetworkGraphic and TSharedPortableAnyMapGraphic.

## See also

TSharedRasterImage |  | Implements a reference counted raster image that may be shared between controls.
TSharedBitmap |  | Defines a reference-counted shared Bitmap graphic.
TSharedPixmap |  | Implements a reference-counted shared Pixmap image type.
TSharedJPEGImage |  | TSharedJpegImage - a reference counted shared image of type JPEG.
TSharedPortableNetworkGraphic |  | TSharedPortableNetworkGraphic - a reference counted PNG Image.
TSharedPortableAnyMapGraphic |  | TSharedPortableAnyMapGraphic - a reference counted shared PNM.