CVImageBuffer

An interface for managing different types of image data.

Overview

Core Video image buffers provides a convenient interface for managing different types of image data. Pixel buffers and Core Video OpenGL buffers derive from the Core Video image buffer.

Topics

Inspecting Image Buffers

func CVImageBufferGetCleanRect(CVImageBuffer) -> CGRect

Returns the source rectangle of a Core Video image buffer that represents the clean aperture of the buffer in encoded pixels.

func CVImageBufferGetColorSpace(CVImageBuffer) -> Unmanaged<CGColorSpace>?

Returns the color space of a Core Video image buffer.

func CVImageBufferGetDisplaySize(CVImageBuffer) -> CGSize

Returns the nominal output display size, in square pixels, of a Core Video image buffer.

func CVImageBufferGetEncodedSize(CVImageBuffer) -> CGSize

Returns the full encoded dimensions of a Core Video image buffer.

func CVImageBufferIsFlipped(CVImageBuffer) -> Bool

Returns a Boolean value indicating whether the image is flipped vertically.

Creating Color Spaces

func CVImageBufferCreateColorSpaceFromAttachments(CFDictionary) -> Unmanaged<CGColorSpace>?

Attempts to create a CGColorSpace from an image buffer's attachments.

Data Types

typealias CVImageBuffer

A reference to a Core Video image buffer.

Constants

Image Buffer Attachment Keys

The attachment types associated with image buffers.

Image Buffer Clean Aperture Keys

Keys describing the clean aperture of an image buffer.

Image Buffer Pixel Aspect Ratio Keys

Keys describing the pixel aspect ratio of an image buffer.

Image Buffer Display Dimensions Keys

Keys describing the display dimensions of an image buffer.

Image Buffer Field Detail Constants

Constants indicating the field ordering of interlaced video in an image buffer.

Image Buffer YCbCr Matrix Constants

Constants indicating the type of conversion matrix used when converting image buffer data from the YCbCr color space to the RGB color space.

Image Buffer Color Primaries Constants

Constants indicating the color primaries gamut for the image buffer.

Image Buffer Transfer Function Constants

Constants indicating the transfer function for the image buffer.

Image Buffer Chroma Location Constants

Constants indicating locations for chroma samples in the image buffer.

Image Buffer Chroma Subsampling Constants

Constants indicating the original format of subsampled data in the image buffer before conversion to 422/2vuy format.

See Also

Data Processing

CVBuffer

An abstract base class that defines how to interact with data buffers.

CVPixelBuffer

An image buffer that holds pixels in main memory.

CVPixelBufferPool

A utility object for managing a recyclable set of pixel buffer objects.

CVPixelFormatDescription

An API that provides functions and types for defining custom pixel formats.