<!--
{
  "availability" : [
    "iOS: 7.0.0 - 27.0.0",
    "iPadOS: 7.0.0 - 27.0.0",
    "macCatalyst: 13.1.0 - 27.0.0",
    "macOS: 10.9.0 - 27.0.0",
    "tvOS: 9.0.0 - 27.0.0",
    "visionOS: 1.0.0 - 27.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVVideoCompositionRenderContext/newPixelBuffer()",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVVideoCompositionRenderContext(im)newPixelBuffer"
  },
  "title" : "newPixelBuffer()"
}
-->

# newPixelBuffer()

Returns a pixel buffer to use for rendering.

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

## Return Value

A <doc://com.apple.documentation/documentation/CoreVideo/CVPixelBuffer> to use for rendering.

## Discussion

The buffer’s <doc://com.apple.documentation/documentation/CoreVideo/kCVImageBufferCleanApertureKey> and <doc://com.apple.documentation/documentation/CoreVideo/kCVImageBufferPixelAspectRatioKey> attachments are set to match the current composition processor properties. You’re responsible for calling <doc://com.apple.documentation/documentation/CoreVideo/CVBufferRelease> on the pixel 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)