---
title: MPSImageSubtract
framework: metalperformanceshaders
role: symbol
role_heading: Class
path: metalperformanceshaders/mpsimagesubtract
---

# MPSImageSubtract

A filter that returns the element-wise difference of its two input images.

## Declaration

```swift
class MPSImageSubtract
```

## Topics

### Initializers

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

## Relationships

### Inherits From

- [MPSImageArithmetic](metalperformanceshaders/mpsimagearithmetic.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 Arithmetic Filters

- [MPSImageAdd](metalperformanceshaders/mpsimageadd.md)
- [MPSImageMultiply](metalperformanceshaders/mpsimagemultiply.md)
- [MPSImageDivide](metalperformanceshaders/mpsimagedivide.md)
- [MPSImageArithmetic](metalperformanceshaders/mpsimagearithmetic.md)
