---
title: newPixelBuffer()
framework: avfoundation
role: symbol
role_heading: Instance Method
path: avfoundation/avvideocompositionrendercontext/newpixelbuffer()
---

# newPixelBuffer()

Returns a pixel buffer to use for rendering.

## Declaration

```swift
func newPixelBuffer() -> CVPixelBuffer?
```

## Return Value

Return Value A CVPixelBuffer to use for rendering.

## Discussion

Discussion The buffer’s kCVImageBufferCleanApertureKey and kCVImageBufferPixelAspectRatioKey attachments are set to match the current composition processor properties. You’re responsible for calling CVBufferRelease on the pixel buffer.

## See Also

### Creating the pixel buffer

- [makeMutablePixelBuffer()](avfoundation/avvideocompositionrendercontext/makemutablepixelbuffer().md)
