---
title: "Bitmap Constructor (Color, Int32, Int32, PixelFormat, ColorPalette)"
canonical: https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Bitmap_ctor_5_812b9ea2.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 Constructor (Color, Int32, Int32, PixelFormat, ColorPalette)
 
Creates new [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md) instance of given dimensions and pixel format. Background color is specified.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Sub New ( _background As Color, _width As Integer, _height As Integer, _format As PixelFormat, _palette As ColorPalette _
)
```
 
```csharp
public Bitmap(Color background,int width,int height,PixelFormat format,ColorPalette palette
)
```
 
### Parameters
 
 - background
     - Type: [Aurigma.GraphicsMill.Color](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Color.htm.md)
Background color to fill the bitmap with.

 - width
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Width of new bitmap (in pixels).

 - height
     - Type: [System.Int32](http://msdn2.microsoft.com/en-us/td2s409d)
Height of new bitmap (in pixels).

 - format
     - Type: [Aurigma.GraphicsMill.PixelFormat](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_PixelFormat.htm.md)
Pixel format of new bitmap. If pixel format is not indexed, *palette* is ignored.

 - palette
     - Type: [Aurigma.GraphicsMill.ColorPalette](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_ColorPalette.htm.md)
Palette attached to new bitmap. Note, this palette object is binded to bitmap, not copied. It means that if you later change anything in palette object, changes will be reflected in the palette of bitmap.
 
## Remarks
 If color space of the color does not fit color space of the pixel format, color is converted to necessary color space.
   
## See Also

### Reference

- [Bitmap Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md)
- [Bitmap Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Bitmap_ctor.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
