<!--
{
  "availability" : [
    "iOS: 7.0.0 -",
    "iPadOS: 7.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.9.0 -",
    "tvOS: 7.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImageBuffer_GetSize(_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@F@vImageBuffer_GetSize"
  },
  "title" : "vImageBuffer_GetSize(_:)"
}
-->

# vImageBuffer_GetSize(_:)

Returns the size, in pixels, of a vImage buffer.

```
func vImageBuffer_GetSize(_ buf: UnsafePointer<vImage_Buffer>) -> CGSize
```

## Parameters

`buf`

The vImage buffer to query.

## Return Value

The size of the buffer.

## Discussion

The vImage library defines a buffer’s width and height as [`vImagePixelCount`](/documentation/Accelerate/vImagePixelCount) values that may be larger than <doc://com.apple.documentation/documentation/Swift/FloatingPoint/greatestFiniteMagnitude>. This function rounds down the buffer’s dimensions to the nearest representable <doc://com.apple.documentation/documentation/CoreFoundation/CGFloat-swift.struct> values that are less than, or equal to, the size of the buffer.

---

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)