<!--
{
  "availability" : [
    "iOS: 14.0.0 -",
    "iPadOS: 14.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreImage",
  "identifier" : "/documentation/CoreImage/CIFilter-swift.class/histogramDisplay()",
  "metadataVersion" : "0.1.0",
  "role" : "Type Method",
  "symbol" : {
    "kind" : "Type Method",
    "modules" : [
      "Core Image",
      "CoreImage"
    ],
    "preciseIdentifier" : "c:objc(cs)CIFilter(cm)histogramDisplayFilter"
  },
  "title" : "histogramDisplay()"
}
-->

# histogramDisplay()

Generates a histogram map from the image.

```
class func histogramDisplay() -> any CIFilter & CIHistogramDisplay
```

## Return Value

The generated image.

## Discussion

This method applies the histogram display filter to the result of the output from the [`areaHistogram()`](/documentation/CoreImage/CIFilter-swift.class/areaHistogram()) filter. This effect shows a graphical representation of the tonal distribution of colors in the image.

The histogram display filter uses the following properties:

- `inputImage`: An image with the type [`CIImage`](/documentation/CoreImage/CIImage). Typically this is the output from the area histogram filter.
- `height`: A `float` representing the height of the generated histogram image as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `lowLimit`: A `float` representing the fraction of the left portion of the histogram image to make darker as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.
- `hightLimit`: A `float` representing the fraction of the right portion of the histogram to make lighter as an <doc://com.apple.documentation/documentation/Foundation/NSNumber>.

The following code creates a filter that results in a histogram diagram generated from the input image:

```swift
func areaHistogram(inputImage: CIImage) -> CIImage {
    let filter = CIFilter.areaHistogram()
    filter.inputImage = inputImage
    filter.count = 256
    filter.scale = 50
    filter.extent = CGRect(
        x: inputImage.extent.width/2-250,
        y: inputImage.extent.height/2-250,
        width: 500,
        height: 500)
    return filter.outputImage!
}

func histogramDisplay(inputImage: CIImage) -> CIImage {
    let filter = CIFilter.histogramDisplay()
    filter.inputImage = areaHistogram(inputImage: inputImage)
    filter.highLimit = 1
    filter.height = 100
    filter.lowLimit = 0
    return filter.outputImage!
}
```

![Two images side by side horizontally. The left image is a modern building with white concrete and tinted glass windows with a clear sky in the background. The right image is the result of applying the histogram display filter to the output of the area histogram filter. There are three overlaid charts representing the histograms for the red, green, and blue components.](images/com.apple.coreimage/media-4332168@2x.png)

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)