One Logo Pool Ball
CoreVideo · IOS API REFERENCE

CVPixelBufferAttributes

struct · iOS 26.0+ · SDK 27.1

@dynamicMemberLookup struct 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.

Members (17)

init · iOS 26.0+

init

TypeScript
static initRawAttributes(rawAttributes: Record<string, SDKHandle>): CVPixelBufferAttributes
Swift declaration
init(rawAttributes: [String : any Sendable])

Create an instance using a freeform attribute dictionary This dictionary should only contain the pixel buffer attributes that ``CVPixelBufferCreate`` function accepts.

get · iOS 26.0+

rawAttributes

TypeScript
get rawAttributes(): Record<string, SDKHandle>
Swift declaration
var rawAttributes: [String : any Sendable] { get }
get · iOS 27.0+

attachments

TypeScript
get attachments(): (CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>) | null
Swift declaration
var attachments: CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>? { get set }

Attachments to set on the pixel buffer.

set · iOS 27.0+

attachments

TypeScript
set attachments(value: (CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>) | null)
Swift declaration
var attachments: CVAttachmentContainer<CVPixelBufferAttachmentKeyDefinitions>? { get set }

Attachments to set on the pixel buffer.

subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember(keyPath: SDKHandle): (CVPixelFormatType) | null
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelFormatType>) -> CVPixelFormatType? { get set }
subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember56834(keyPath: SDKHandle): CVPixelFormatDescription_Compatibility
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelFormatDescription.Compatibility>) -> CVPixelFormatDescription.Compatibility { get set }
subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember27911(keyPath: SDKHandle): (CVPixelFormatDescription) | null
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelFormatDescription?>) -> CVPixelFormatDescription? { get set }
subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember91426(keyPath: SDKHandle): (CVPixelBufferPadding) | null
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelBufferPadding?>) -> CVPixelBufferPadding? { get set }
subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember74861(keyPath: SDKHandle): CVPixelBufferCreationAttributes_Backing
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVPixelBufferCreationAttributes.Backing>) -> CVPixelBufferCreationAttributes.Backing { get set }
subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember22177(keyPath: SDKHandle): (CVImageSize) | null
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, CVImageSize>) -> CVImageSize? { get set }
subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember90849(keyPath: SDKHandle): (boolean) | null
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, Bool>) -> Bool? { get set }
subscript · iOS 26.0+

subscript

TypeScript
subscriptDynamicMember61709(keyPath: SDKHandle): (number) | null
Swift declaration
subscript(dynamicMember keyPath: WritableKeyPath<CVPixelBufferCreationAttributes, Int?>) -> Int? { get set }
init · iOS 26.0+

init

TypeScript
static initPixelFormatTypesSizeCompatibilityBytesPerRowAlignmentPlaneAlignmentExtendedPixels(pixelFormatTypes?: (Array<CVPixelFormatType>) | null, size?: (CVImageSize) | null, compatibility?: CVPixelFormatDescription_Compatibility, bytesPerRowAlignment?: (number) | null, planeAlignment?: (number) | null, extendedPixels?: (CVPixelBufferPadding) | null): CVPixelBufferAttributes
Swift declaration
init(pixelFormatTypes: [CVPixelFormatType]? = nil, size: CVImageSize? = nil, compatibility: CVPixelFormatDescription.Compatibility = [], bytesPerRowAlignment: Int? = nil, planeAlignment: Int? = nil, extendedPixels: CVPixelBufferPadding? = nil)
get · iOS 26.0+

pixelFormatTypes

TypeScript
get pixelFormatTypes(): (Array<CVPixelFormatType>) | null
Swift declaration
var pixelFormatTypes: [CVPixelFormatType]? { get set }

Allow multiple pixel formats to be specified in attributes Setting this property will override the single format value set by ``CVPixelBufferCreationAttributes/pixelFormatType`` and vice-versa. When accessing ``CVPixelBufferCreationAttributes/pixelFormatType``, only the first value is used if multiple format values are set. Do not set this value to an empty array.

set · iOS 26.0+

pixelFormatTypes

TypeScript
set pixelFormatTypes(value: (Array<CVPixelFormatType>) | null)
Swift declaration
var pixelFormatTypes: [CVPixelFormatType]? { get set }

Allow multiple pixel formats to be specified in attributes Setting this property will override the single format value set by ``CVPixelBufferCreationAttributes/pixelFormatType`` and vice-versa. When accessing ``CVPixelBufferCreationAttributes/pixelFormatType``, only the first value is used if multiple format values are set. Do not set this value to an empty array.

init · iOS 26.0+

init

TypeScript
static initMerging(values: Array<CVPixelBufferAttributes>): (CVPixelBufferAttributes) | null
Swift declaration
init?(merging values: [CVPixelBufferAttributes])

Resolve multiple attribute specifications into a single instance. This is useful when you need to resolve multiple requirements between different potential clients of a buffer.

init · iOS 26.0+

init

TypeScript
static init(attributes: CVPixelBufferCreationAttributes): CVPixelBufferAttributes
Swift declaration
init(_ attributes: CVPixelBufferCreationAttributes)

Convert CreationAttributes to Attributes

Skipped declarations

No declarations were skipped in this snapshot.

All CoreVideo types →