---
title: "BitmapStatisticsProvider Class"
canonical: https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapStatisticsProvider.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/)

# BitmapStatisticsProvider Class
 
This class contains methods used by [Bitmap](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Bitmap.htm.md) to retrieve various bitmap statistics.
 
**Namespace:** [Aurigma.GraphicsMill](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
 **Assembly:** Aurigma.GraphicsMill (in Aurigma.GraphicsMill.dll)
 
## Syntax
  
```
Public Class BitmapStatisticsProvider _Inherits LockableObject
```
 
```csharp
public class BitmapStatisticsProvider : LockableObject
```
 
## Remarks
 Main feature of this class is possibility to calculate bitmap histogram. Histogram is an array of values that specify how much pixels has a luminosity (or other value that specifies pixel brightness level) equal to appropriate array index. It can be either calculated as histogram of bitmap luminosity ([GetLuminosityHistogram()](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_BitmapStatisticsProvider_GetLuminosityHistogram.htm.md) method), or histogram of the channels sum ([GetSumHistogram(Boolean)](https://www.graphicsmill.com/docs/gm5/M_Aurigma_GraphicsMill_BitmapStatisticsProvider_GetSumHistogram_1_ea7b1ae4.htm.md) method). Last method is used in Adobe® Photoshop® by default.
 
## Examples
  
```
Dim histogram As Aurigma.GraphicsMill.Histogram = _
 bitmap.Statistics.GetSumHistogram(False)

For i As Integer = 0 To histogram.Length - 1
    Console.WriteLine(i & ": " & histogram(i))
Next
```
 
```csharp
Aurigma.GraphicsMill.Histogram histogram =
    bitmap.Statistics.GetSumHistogram(false);

for (int i = 0; i < histogram.Length; i++)
{
    Console.WriteLine(i + ": " + histogram[i]);
}
```
 
## Inheritance Hierarchy
  
- [System.Object](http://msdn2.microsoft.com/en-us/e5kfa45b)
    - [Aurigma.GraphicsMill.LockableObject](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_LockableObject.htm.md)
        - Aurigma.GraphicsMill.BitmapStatisticsProvider
 
## Thread Safety
 Static members of this type are safe for multi-threaded operations. Instance members of this type are safe for multi-threaded operations.
 
## Object Model

[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_32.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_BitmapStatisticsProvider.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel2.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_33.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Histogram.htm.md)
![](https://www.graphicsmill.com/docs/gm5/ObjectModel1.png)[![](https://www.graphicsmill.com/docs/gm5/Aurigma.GraphicsMill_ObjectModel_34.png)](https://www.graphicsmill.com/docs/gm5/T_Aurigma_GraphicsMill_Histogram.htm.md)
  
## See Also

### Reference

- [BitmapStatisticsProvider Members](https://www.graphicsmill.com/docs/gm5/AllMembers_T_Aurigma_GraphicsMill_BitmapStatisticsProvider.htm.md)
- [Aurigma.GraphicsMill Namespace](https://www.graphicsmill.com/docs/gm5/N_Aurigma_GraphicsMill.htm.md)
