---
title: MPSImageStatisticsMinAndMax
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsimagestatisticsminandmax
---

# MPSImageStatisticsMinAndMax

A kernel that computes the minimum and maximum pixel values for a given region of an image.

## Declaration

```swift
class MPSImageStatisticsMinAndMax
```

## Overview

Overview The minimum and maximum values are written to the destination image at the following pixel locations: Minimum value is written at pixel location (0, 0) Maximum value is written at pixel location (1, 0)

## Topics

### Initializers

- [init(coder:device:)](metalperformanceshaders/mpsimagestatisticsminandmax/init(coder:device:).md)
- [init(device:)](metalperformanceshaders/mpsimagestatisticsminandmax/init(device:).md)

### Instance Properties

- [clipRectSource](metalperformanceshaders/mpsimagestatisticsminandmax/cliprectsource.md)

## Relationships

### Inherits From

- [MPSUnaryImageKernel](metalperformanceshaders/mpsunaryimagekernel.md)

### Conforms To

- [CVarArg](swift/cvararg.md)
- [CustomDebugStringConvertible](swift/customdebugstringconvertible.md)
- [CustomStringConvertible](swift/customstringconvertible.md)
- [Equatable](swift/equatable.md)
- [Hashable](swift/hashable.md)
- [NSCoding](foundation/nscoding.md)
- [NSCopying](foundation/nscopying.md)
- [NSObjectProtocol](objectivec/nsobjectprotocol.md)
- [NSSecureCoding](foundation/nssecurecoding.md)

## See Also

### Image Statistics Filters

- [MPSImageStatisticsMean](metalperformanceshaders/mpsimagestatisticsmean.md)
- [MPSImageStatisticsMeanAndVariance](metalperformanceshaders/mpsimagestatisticsmeanandvariance.md)
