Contents

pixelBuffer(resolution:pixelFormat:)

Returns the image as a CVPixelBuffer, optionally resampled to a given resolution and pixel format.

Declaration

func pixelBuffer(resolution: CGSize? = nil, pixelFormat: OSType? = nil) throws -> CVReadOnlyPixelBuffer

Parameters

  • resolution:

    The desired resolution of the pixel buffer. Default behavior will use the image’s original resolution.

  • pixelFormat:

    The pixel format of the pixel buffer. Defaults to kCVPixelFormatType_32BGRA.