<!--
{
  "availability" : [
    "iOS: 4.0.0 -",
    "iPadOS: 4.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.4.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -",
    "watchOS: 2.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVPixelBufferPoolCreatePixelBuffer(_:_:_:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "c:@F@CVPixelBufferPoolCreatePixelBuffer"
  },
  "title" : "CVPixelBufferPoolCreatePixelBuffer(_:_:_:)"
}
-->

# CVPixelBufferPoolCreatePixelBuffer(_:_:_:)

Creates a pixel buffer from a pixel buffer pool, using the allocator that you specify.

```
func CVPixelBufferPoolCreatePixelBuffer(_ allocator: CFAllocator?, _ pixelBufferPool: CVPixelBufferPool, _ pixelBufferOut: UnsafeMutablePointer<CVPixelBuffer?>) -> CVReturn
```

## Parameters

`allocator`

The allocator to use for creating the pixel buffer. Pass <doc://com.apple.documentation/documentation/CoreFoundation/kCFAllocatorDefault> to use the default allocator. See <doc://com.apple.documentation/documentation/CoreFoundation/predefined-allocators> for additional values you can use.

`pixelBufferPool`

The pixel buffer pool for creating the new pixel buffer.

`pixelBufferOut`

On output, the newly created pixel buffer.

## Return Value

A Core Video result code. See [Result Codes](/documentation/CoreVideo/result-codes) for possible values.

## Discussion

This function creates a new pixel buffer using the pixel buffer attributes specified during pool creation. This buffer has default attachments as specified in the `pixelBufferAttributes` parameter of [`CVPixelBufferPoolCreate(_:_:_:_:)`](/documentation/CoreVideo/CVPixelBufferPoolCreate(_:_:_:_:)), using either the [`kCVBufferPropagatedAttachmentsKey`](/documentation/CoreVideo/kCVBufferPropagatedAttachmentsKey) or [`kCVBufferNonPropagatedAttachmentsKey`](/documentation/CoreVideo/kCVBufferNonPropagatedAttachmentsKey) attributes.

---

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)