---
title: areaMinMaxRed()
framework: coreimage
role: symbol
role_heading: Type Method
path: coreimage/cifilter-swift.class/areaminmaxred()
---

# areaMinMaxRed()

Calculates the minimum and maximum red component value.

## Declaration

```swift
class func areaMinMaxRed() -> any CIFilter & CIAreaMinMaxRed
```

## Return Value

Return Value The generated image.

## Discussion

Discussion This method applies the area-minimum-maximum-red filter to an image. This effect calculates the darkest and lightest red color value in the region defined by extent. The red and green components of the 1 x 1 pixel output image contain the result. The area-minimum-maximum-red filter uses the following properties: The following code creates a filter that results in a 1 x 1 pixel image with the red and green color components populated: func areaMinMaxRed(inputImage: CIImage) -> CIImage {     let filter = CIFilter.areaMinMaxRed()     filter.inputImage = inputImage     filter.extent = CGRect(         x: inputImage.extent.width/2-250,         y: inputImage.extent.height/2-250,         width: 500,         height: 500)      return filter.outputImage! }

## See Also

### Filters

- [areaAverage()](coreimage/cifilter-swift.class/areaaverage().md)
- [areaHistogram()](coreimage/cifilter-swift.class/areahistogram().md)
- [areaLogarithmicHistogram()](coreimage/cifilter-swift.class/arealogarithmichistogram().md)
- [areaMaximum()](coreimage/cifilter-swift.class/areamaximum().md)
- [areaMaximumAlpha()](coreimage/cifilter-swift.class/areamaximumalpha().md)
- [areaMinimum()](coreimage/cifilter-swift.class/areaminimum().md)
- [areaMinimumAlpha()](coreimage/cifilter-swift.class/areaminimumalpha().md)
- [areaMinMax()](coreimage/cifilter-swift.class/areaminmax().md)
- [columnAverage()](coreimage/cifilter-swift.class/columnaverage().md)
- [histogramDisplay()](coreimage/cifilter-swift.class/histogramdisplay().md)
- [kMeans()](coreimage/cifilter-swift.class/kmeans().md)
- [rowAverage()](coreimage/cifilter-swift.class/rowaverage().md)
