---
title: "vImageBuffer_GetSize(_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vimagebuffer_getsize(_:)"
---

# vImageBuffer_GetSize(_:)

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

## Declaration

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

## Parameters

- `buf`: The vImage buffer to query.

## Return Value

Return Value The size of the buffer.

## Discussion

Discussion The vImage library defines a buffer’s width and height as vImagePixelCount values that may be larger than greatestFiniteMagnitude. This function rounds down the buffer’s dimensions to the nearest representable CGFloat values that are less than, or equal to, the size of the buffer.
