<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "MetalPerformanceShaders",
  "identifier" : "/documentation/MetalPerformanceShaders/MPSSize",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Metal Performance Shaders"
    ],
    "preciseIdentifier" : "c:@S@MPSSize"
  },
  "title" : "MPSSize"
}
-->

# MPSSize

A size of a region in an image.

```
struct MPSSize
```

## Overview

The depth of a region is usually `1.0`.

The `double` data type is used because some kernel operations require fractional precision—for example, the [`MPSImageLanczosScale`](/documentation/MetalPerformanceShaders/MPSImageLanczosScale) filter.

## Topics

### Fields

[`width`](/documentation/MetalPerformanceShaders/MPSSize/width)

The width of the region, in pixels.

[`height`](/documentation/MetalPerformanceShaders/MPSSize/height)

The height of the region, in pixels.

[`depth`](/documentation/MetalPerformanceShaders/MPSSize/depth)

The depth of the region, in pixels.

## Relationships

### Conforms To

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

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

---

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)