---
title: "init(width:height:pixelFormat:)"
framework: accelerate
role: symbol
role_heading: Initializer
path: "accelerate/vimage/pixelbuffer/init(width:height:pixelformat:)"
---

# init(width:height:pixelFormat:)

Returns a new pixel buffer with a width and height that you specify.

## Declaration

```swift
init(width: Int, height: Int, pixelFormat: Format.Type = Format.self)
```

## Parameters

- `width`: The width of the buffer.
- `height`: The 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:)-12gl9.md)
- [init(size:pixelFormat:)](accelerate/vimage/pixelbuffer/init(size:pixelformat:)-96ocu.md)
- [vImage.Size](accelerate/vimage/size.md)
