---
title: "Histogram Constructor (BitmapData, array&lt;Boolean&gt;[]()[])"
canonical: https://www.graphicsmill.com/docs/gm5/C_Aurigma_GraphicsMill_Histogram_ctor_2_b5587c4a.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/)

# Histogram Constructor (BitmapData, Boolean[])
 
Creates new [Histogram](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Histogram.htm.md) instance and builds the histogram for specified bitmap data. Histogram is based on average of pixel channels values (sum of these values divided at channels number). You can specify what channels to include into this sum via *channels* argument.
 
**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 ( _bitmapData As BitmapData, _channels As Boolean() _
)
```
 
```csharp
public Histogram(BitmapData bitmapData,bool[] channels
)
```
 
### Parameters
 
 - bitmapData
     - Type: [Aurigma.GraphicsMill.BitmapData](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapData.htm.md)
 [BitmapData](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapData.htm.md) class instance to build the histogram for.

 - channels
     - Type:  [System.Boolean](http://msdn2.microsoft.com/en-us/a28wyd50) []
Array of flags specifying what channels to use when calculating the histogram. If array item is **true**, the channel with appropriate index is used. Otherwise this channel is skipped.
   
## See Also

### Reference

- [Histogram Class](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Histogram.htm.md)
- [Histogram Overload](https://www.graphicsmill.com/docs/gm5/O_T_Aurigma_GraphicsMill_Histogram_ctor.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
