Home > Language Reference > Classes > Bitmap
BitDepth Property
Bit depth of the image.
Syntax
Public Property Get BitDepth() As Integer
Remarks
The BitDepth property indicates the number of bits used to store each pixel of the image. If the object does not contain an image and is associated with a resource, it is loaded. Otherwise, a runtime error occurs.
It is not possible to associate a custom palette to an image. Therefore, the bit depth also indicates which system palette the bitmap uses. The following table lists the possible values this property can return, and describes the color model they correspond to:
| Value | Description |
| 1 | The bitmap uses a monochrome black and white palette. |
| 2 | The bitmap uses a 4 grey levels palette. |
| 4 | The bitmap uses a 16 grey levels palette. |
| 8 | The bitmap uses a 256 colors palette. |
| 16 | The bitmap does not have a palette, and uses true colors. |
This property is read-only. The bit depth of an image is either specified when creating the bitmap using the Create method, or either automatically determined according to the current graphic mode when the bitmap is loaded from a resource.
System requirements
| System | Minimal version | Remarks |
| Palm OS | Palm OS 3.0 | N/A |