---
title: "Bitmap..::.BitsPerPixel Property "
canonical: https://www.graphicsmill.com/docs/gm5/P_Aurigma_GraphicsMill_Bitmap_BitsPerPixel.htm
product: "Graphics Mill 5.5 for .NET"
---

This documentation is for the old version. [Go to the latest Graphics Mill docs](https://www.graphicsmill.com/docs/gm/)

# Bitmap.BitsPerPixel Property 
 
Returns number of bits per pixel.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public ReadOnly Property BitsPerPixel As Integer
```
 
```csharp
public int BitsPerPixel { get; }
```
 
### Property Value
Number of bits per pixel of current pixel format.
 
## Examples
  
```
Console.WriteLine("Bitmap: " & bitmap.BitsPerPixel)

Dim bitmapData As Aurigma.GraphicsMill.BitmapData = bitmap.LockBits()

Console.WriteLine("BitmapData: " & bitmapData.BitsPerPixel)

bitmap.UnlockBits(bitmapData)
```
 
```csharp
Console.WriteLine("Bitmap: " + bitmap.BitsPerPixel);

Aurigma.GraphicsMill.BitmapData bitmapData = bitmap.LockBits();

Console.WriteLine("BitmapData: " + bitmapData.BitsPerPixel);

bitmap.UnlockBits(bitmapData);
```
   
## See Also

### Reference

- [Bitmap Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
