---
title: numberOfHistogramEntries
framework: metalperformanceshaders
role: symbol
role_heading: Instance Property
path: metalperformanceshaders/mpsimagehistograminfo/numberofhistogramentries
---

# numberOfHistogramEntries

Specifies the number of histogram entries (bins) for each channel.

## Declaration

```swift
var numberOfHistogramEntries: Int
```

## Discussion

Discussion This value must be both a power of 2 and a minimum of 256 bins. For example, if you want 256 histogram bins then this value must be set to 256. The value stored in each histogram bin is a 32-bit unsigned integer. The size of the histogram buffer in which these bins will be stored should be more than or equal to: number of histogram entries * sizeof(uint32_t) * number of channels in the image

## See Also

### Fields

- [histogramForAlpha](metalperformanceshaders/mpsimagehistograminfo/histogramforalpha.md)
- [minPixelValue](metalperformanceshaders/mpsimagehistograminfo/minpixelvalue.md)
- [maxPixelValue](metalperformanceshaders/mpsimagehistograminfo/maxpixelvalue.md)
