<!--
{
  "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/CVPixelBufferAttributes",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "s:9CoreVideo23CVPixelBufferAttributesV"
  },
  "title" : "CVPixelBufferAttributes"
}
-->

# CVPixelBufferAttributes

A partial set of pixel buffer creation attributes. This struct is useful for conveying partial requirements for
pixel buffers to clients. This struct makes all properties of `CVPixelBuffer/CreationAttributes` optional.

```
@dynamicMemberLookup struct CVPixelBufferAttributes
```

## Topics

### Initializers

[`init(CVPixelBufferCreationAttributes)`](/documentation/CoreVideo/CVPixelBufferAttributes/init(_:))

Convert CreationAttributes to Attributes

[`init?(merging: [CVPixelBufferAttributes])`](/documentation/CoreVideo/CVPixelBufferAttributes/init(merging:))

Resolve multiple attribute specifications into a single instance.

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

[`init(rawAttributes: [String : any Sendable])`](/documentation/CoreVideo/CVPixelBufferAttributes/init(rawAttributes:))

Create an instance using a freeform attribute dictionary

### Instance Properties

[`var attachments: CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>?`](/documentation/CoreVideo/CVPixelBufferAttributes/attachments)

Attachments to set on the pixel buffer.

[`var pixelFormatTypes: [CVPixelFormatType]?`](/documentation/CoreVideo/CVPixelBufferAttributes/pixelFormatTypes)

Allow multiple pixel formats to be specified in attributes

[`var rawAttributes: [String : any Sendable]`](/documentation/CoreVideo/CVPixelBufferAttributes/rawAttributes)

### Subscripts

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, Int?>) -> Int?`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-16n5o)

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelFormatDescription?>) -> CVPixelFormatDescription?`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-2fcvp)

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelBufferPadding?>) -> CVPixelBufferPadding?`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-2kg2b)

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelFormatDescription.Compatibility>) -> CVPixelFormatDescription.Compatibility`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-4r0es)

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelFormatType>) -> CVPixelFormatType?`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-63jp4)

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, Bool>) -> Bool?`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-7nhki)

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, CVImageSize>) -> CVImageSize?`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-95xgt)

[`subscript(dynamicMember _: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelBufferCreationAttributes.Backing>) -> CVPixelBufferCreationAttributes.Backing`](/documentation/CoreVideo/CVPixelBufferAttributes/subscript(dynamicMember:)-jo6l)

## Relationships

### Conforms To

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

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

---

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)