vImage Buffers

Use buffers to pass image data to and from vImage operations.


The vImage_Buffer structure is the fundamental data type for passing image data to and from vImage operations. vImage provides convenience methods for initializing buffers from Core Graphics images and Core Video pixel buffers, and for creating Core Graphics images and populating Core Video pixel buffers from vImage buffers.

A vImage buffer describes a rectangular region of pixels and specifies the width, height, number of bytes in each row, and a pointer to the pixel data memory. However, a buffer doesn't describe image properties such as pixel format, color space, and channel ordering.


Initializing vImage Buffers

struct vImage_Buffer

The basic data structure used by vImage functions for passing image data.

Querying vImage Buffer Attributes

func vImageBuffer_GetSize(UnsafePointer<vImage_Buffer>) -> CGSize

Returns the size, in pixels, of a vImage buffer.

See Also

vImage Buffers

Optimizing Image Processing Performance

Improve your app's performance by converting image buffer formats from interleaved to planar.