---
title: MPSImageAreaMax
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsimageareamax
---

# MPSImageAreaMax

A filter that finds the maximum pixel value in a rectangular region centered around each pixel in the source image.

## Declaration

```swift
class MPSImageAreaMax
```

## Overview

Overview If there are multiple channels in the source image, each channel is processed independently. The edgeMode property value is assumed to always be MPSImageEdgeMode.clamp for this filter.

## Topics

### Initializers

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

### Methods

- [init(device:kernelWidth:kernelHeight:)](metalperformanceshaders/mpsimageareamax/init(device:kernelwidth:kernelheight:).md)

### Properties

- [kernelHeight](metalperformanceshaders/mpsimageareamax/kernelheight.md)
- [kernelWidth](metalperformanceshaders/mpsimageareamax/kernelwidth.md)

## Relationships

### Inherits From

- [MPSUnaryImageKernel](metalperformanceshaders/mpsunaryimagekernel.md)

### Inherited By

- [MPSImageAreaMin](metalperformanceshaders/mpsimageareamin.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

### Morphological Image Filters

- [MPSImageDilate](metalperformanceshaders/mpsimagedilate.md)
- [MPSImageAreaMin](metalperformanceshaders/mpsimageareamin.md)
- [MPSImageErode](metalperformanceshaders/mpsimageerode.md)
