<!--
{
  "availability" : [
    "*: -",
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVBuffer/CreationAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Video",
      "CoreVideo"
    ],
    "preciseIdentifier" : "s:So11CVBufferRefa9CoreVideoE18CreationAttributesV"
  },
  "title" : "CVBuffer.CreationAttributes"
}
-->

# CVBuffer.CreationAttributes

Attributes needed for creating a pixel buffer.

```
struct CreationAttributes
```

## Topics

### Initializers

[`init?(CVBuffer.Attributes)`](/documentation/CoreVideo/CVBuffer/CreationAttributes/init(_:))

Convert Attributes to CreationAttributes. This init will fail if [`pixelFormatType`](/documentation/CoreVideo/CVBuffer/CreationAttributes/pixelFormatType) or [`size`](/documentation/CoreVideo/CVBuffer/CreationAttributes/size) properties are absent.

[`init(pixelFormatType: CVPixelFormatType, size: CVImageSize, compatibility: CVPixelFormatDescription.Compatibility, bytesPerRowAlignment: Int?, planeAlignment: Int?, extendedPixels: CVPixelBufferPadding?)`](/documentation/CoreVideo/CVBuffer/CreationAttributes/init(pixelFormatType:size:compatibility:bytesPerRowAlignment:planeAlignment:extendedPixels:))

### Instance Properties

[`var backing: CVBuffer.CreationAttributes.Backing`](/documentation/CoreVideo/CVBuffer/CreationAttributes/backing-swift.property)

Defines how the memory for the pixel buffer backing is allocated. IOSurface backed pixel buffers
can be shared between CPU and GPU also across process boundaries.
Defaults to `Backing.ioSurface`.

[`var bytesPerRowAlignment: Int?`](/documentation/CoreVideo/CVBuffer/CreationAttributes/bytesPerRowAlignment)

The number of bytes per row in the pixel buffer must be a multiple of this number.

[`var compatibility: CVPixelFormatDescription.Compatibility`](/documentation/CoreVideo/CVBuffer/CreationAttributes/compatibility)

Defines interoperability of pixel buffers with other frameworks

[`var extendedPixels: CVPixelBufferPadding?`](/documentation/CoreVideo/CVBuffer/CreationAttributes/extendedPixels)

Sets the amount of extended pixel padding in the pixel buffer.

[`var pixelFormatType: CVPixelFormatType`](/documentation/CoreVideo/CVBuffer/CreationAttributes/pixelFormatType)

Format of the pixel buffer bytes

[`var planeAlignment: Int?`](/documentation/CoreVideo/CVBuffer/CreationAttributes/planeAlignment)

Planes start on a byte number that’s a multiple of this value.

[`var size: CVImageSize`](/documentation/CoreVideo/CVBuffer/CreationAttributes/size)

Size of the buffer in pixels

### Enumerations

[`enum Backing`](/documentation/CoreVideo/CVBuffer/CreationAttributes/Backing-swift.enum)

Type of backing storage used by the pixel buffer

## Relationships

### Conforms To

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Equatable`](/documentation/Swift/Equatable)

[`Sendable`](/documentation/Swift/Sendable)

---

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)