---
title: "init(size:pixelFormat:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/vimage/pixelbuffer/init(size:pixelformat:)-12gl9"
---

# init(size:pixelFormat:)

Returns a new multiplane pixel buffer with a size that you specify.

## Declaration

```swift
init(size: vImage.Size, pixelFormat: Format.Type = Format.self)
```

## Parameters

- `size`: The width and height of the buffer.
- `pixelFormat`: The pixel format of the buffer.

## Discussion

Discussion This initializer allocates but doesn’t initialize the pixel buffer’s memory. That is, the operation doesn’t guarantee that all pixel values are zero.

## See Also

### Creating a pixel buffer

- [init(size:pixelFormat:)](accelerate/vimage/pixelbuffer/init(size:pixelformat:)-96ocu.md)
- [init(width:height:pixelFormat:)](accelerate/vimage/pixelbuffer/init(width:height:pixelformat:).md)
- [vImage.Size](accelerate/vimage/size.md)
