<!--
{
  "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/Attributes",
  "metadataVersion" : "0.1.0",
  "role" : "Structure",
  "symbol" : {
    "kind" : "Structure",
    "modules" : [
      "Core Video",
      "CoreVideo"
    ],
    "preciseIdentifier" : "s:So11CVBufferRefa9CoreVideoE10AttributesV"
  },
  "title" : "CVBuffer.Attributes"
}
-->

# CVBuffer.Attributes

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 Attributes
```

## Topics

### Initializers

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

Convert CreationAttributes to Attributes

[`init?(merging: [CVBuffer.Attributes])`](/documentation/CoreVideo/CVBuffer/Attributes/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/CVBuffer/Attributes/init(pixelFormatTypes:size:compatibility:bytesPerRowAlignment:planeAlignment:extendedPixels:))

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

Create an instance using a freeform attribute dictionary

### Instance Properties

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

Allow multiple pixel formats to be specified in attributes

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

### Subscripts

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, CVBuffer.CreationAttributes.Backing>) -> CVBuffer.CreationAttributes.Backing`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-1c1om)

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, CVPixelFormatDescription?>) -> CVPixelFormatDescription?`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-1o2ji)

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, Bool>) -> Bool?`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-21rr)

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, Int?>) -> Int?`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-3c1w8)

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, CVPixelFormatDescription.Compatibility>) -> CVPixelFormatDescription.Compatibility`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-5m9xn)

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, CVPixelFormatType>) -> CVPixelFormatType?`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-6jvmi)

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, CVPixelBufferPadding?>) -> CVPixelBufferPadding?`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-7bidb)

[`subscript(dynamicMember _: WritableKeyPath<CVBuffer.CreationAttributes, CVImageSize>) -> CVImageSize?`](/documentation/CoreVideo/CVBuffer/Attributes/subscript(dynamicMember:)-9n8bh)

## 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)