<!--
{
  "availability" : [
    "iOS: 11.0.0 -",
    "iPadOS: 11.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 11.0.0 -",
    "tvOS: 14.5.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Metal",
  "identifier" : "/documentation/Metal/MTLComputePipelineState/imageblockMemoryLength(forDimensions:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Metal"
    ],
    "preciseIdentifier" : "c:objc(pl)MTLComputePipelineState(im)imageblockMemoryLengthForDimensions:"
  },
  "title" : "imageblockMemoryLength(forDimensions:)"
}
-->

# imageblockMemoryLength(forDimensions:)

Returns the length of reserved memory for an imageblock of a given size.

```
func imageblockMemoryLength(forDimensions imageblockDimensions: MTLSize) -> Int
```

## Parameters

`imageblockDimensions`

An [`MTLSize`](/documentation/Metal/MTLSize) instance that represents the dimensions of an imageblock.

## Return Value

The length, in bytes, occupied by the image block in memory.

## Discussion

---

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)