<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 13.0.0 -",
    "macOS: 10.13.0 -",
    "tvOS: 11.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSImageStatisticsMinAndMax",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:objc(cs)MPSImageStatisticsMinAndMax"
  },
  "title" : "MPSImageStatisticsMinAndMax"
}
-->

# MPSImageStatisticsMinAndMax

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

```
class MPSImageStatisticsMinAndMax
```

## 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

[`-  initWithCoder:device:`](/documentation/MetalPerformanceShaders/MPSImageStatisticsMinAndMax/init(coder:device:))

[`-  initWithDevice:`](/documentation/MetalPerformanceShaders/MPSImageStatisticsMinAndMax/init(device:))

### Instance Properties

[`clipRectSource`](/documentation/MetalPerformanceShaders/MPSImageStatisticsMinAndMax/clipRectSource)

## Relationships

### Conforms To

[`CVarArg`](/documentation/Swift/CVarArg)

[`Equatable`](/documentation/Swift/Equatable)

[`CustomDebugStringConvertible`](/documentation/Swift/CustomDebugStringConvertible)

[`NSCoding`](/documentation/Foundation/NSCoding)

[`NSObjectProtocol`](/documentation/ObjectiveC/NSObjectProtocol)

[`NSSecureCoding`](/documentation/Foundation/NSSecureCoding)

[`Hashable`](/documentation/Swift/Hashable)

[`CustomStringConvertible`](/documentation/Swift/CustomStringConvertible)

[`NSCopying`](/documentation/Foundation/NSCopying)

### Inherits From

[`MPSUnaryImageKernel`](/documentation/MetalPerformanceShaders/MPSUnaryImageKernel)

---

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)