One Logo Pool Ball
Accelerate · IOS API REFERENCE

vImageConverter

class · SDK 27.1

class vImageConverter

Members (12)

method · iOS 13.0+

sourceBuffers

TypeScript
sourceBuffers(colorSpace: _CoreGraphics_CGColorSpace): Array<(vImage_BufferType) | null>
Swift declaration
func sourceBuffers(colorSpace: CGColorSpace) -> [vImage.BufferType?]

Returns an array of vImage source buffer types specifying the order of planes. - Parameter colorSpace: The color space of the source format.

get · iOS 13.0+

sourceBufferCount

TypeScript
get sourceBufferCount(): number
Swift declaration
var sourceBufferCount: Int { get }

The number of source buffers consumed by the converter.

method · iOS 13.0+

destinationBuffers

TypeScript
destinationBuffers(colorSpace: _CoreGraphics_CGColorSpace): Array<(vImage_BufferType) | null>
Swift declaration
func destinationBuffers(colorSpace: CGColorSpace) -> [vImage.BufferType?]

Returns an array of vImage source buffer types specifying the order of planes. - Parameter colorSpace: The color space of the destination format.

method · iOS 13.0+

mustOperateOutOfPlace

TypeScript
mustOperateOutOfPlace(source: vImage_Buffer, destination: vImage_Buffer, options?: vImage_Options): boolean
Swift declaration
func mustOperateOutOfPlace(source: vImage_Buffer, destination: vImage_Buffer, flags options: vImage.Options = .noFlags) throws -> Bool

Determines whether a converter is capable of operating in place. - Parameter source: The source buffer. - Parameter destination: The destination buffer. - Parameter options: The options to use when performing this operation. - Returns: `true` if the conversion must operate out of place or `false` if the operation will work in place.

get · iOS 13.0+

destinationBufferCount

TypeScript
get destinationBufferCount(): number
Swift declaration
var destinationBufferCount: Int { get }

The number of destination buffers written to by the converter.

method · iOS 16.0+

makeCGToCVPixelBuffers

TypeScript
makeCGToCVPixelBuffers(lockedCVPixelBuffer: _CoreVideo_CVBuffer): Array<vImage_PixelBuffer<vImage_DynamicPixelFormat>>
Swift declaration
func makeCGToCVPixelBuffers(referencing lockedCVPixelBuffer: CVPixelBuffer) throws -> [vImage.PixelBuffer<vImage.DynamicPixelFormat>]

Returns an array of pixel buffers in the right order to convert an image to a Core Video formatted image. - Parameter lockedCVPixelBuffer: The locked Core Video pixel buffer. Use `CVPixelBufferLockBaseAddress` and `CVPixelBufferUnlockBaseAddress` to lock and unlock the pixel buffer. - Note: The converter must be Core Graphics to Core Video. The buffers that this function returns share memory with the `CVPixelBuffer` and are only valid while the `CVPixelBuffer` is locked with `CVPixelBufferLockBaseAddress`.

method · iOS 16.0+

makeCVToCGPixelBuffers

TypeScript
makeCVToCGPixelBuffers(lockedCVPixelBuffer: _CoreVideo_CVBuffer): Array<vImage_PixelBuffer<vImage_DynamicPixelFormat>>
Swift declaration
func makeCVToCGPixelBuffers(referencing lockedCVPixelBuffer: CVPixelBuffer) throws -> [vImage.PixelBuffer<vImage.DynamicPixelFormat>]

Returns an array of pixel buffers in the right order to convert a Core Video formatted image to another image format. - Parameter lockedCVPixelBuffer: The locked Core Video pixel buffer. Use `CVPixelBufferLockBaseAddress` and `CVPixelBufferUnlockBaseAddress` to lock and unlock the pixel buffer. - Note: The converter must be Core Video to Core Graphics. The buffers that this function returns share memory with the `CVPixelBuffer` and are only valid while the `CVPixelBuffer` is locked with `CVPixelBufferLockBaseAddress`.

static · iOS 16.0+

make

TypeScript
static makeSourceFormatDestinationFormatColorConversionInfo(sourceFormat: vImage_CGImageFormat, destinationFormat: vImage_CGImageFormat, colorConversionInfo: _CoreGraphics_CGColorConversionInfo): vImageConverter
Swift declaration
static func make(sourceFormat: vImage_CGImageFormat, destinationFormat: vImage_CGImageFormat, colorConversionInfo: CGColorConversionInfo) throws -> vImageConverter

Creates an any-to-any converter that uses a color conversion information object to convert from one image format to another. - Parameter sourceFormat: A `vImage_CGImageFormat` structure that describes the image format of the source image. - Parameter destinationFormat: A `vImage_CGImageFormat` structure that describes the image format of the destination image. - Parameter colorConversionInfo: The object that describes how to convert between color spaces. - Parameter options: The options to use when performing this operation. - Returns: a vImage converter to convert from one vImage Core Graphics image format to another. - Important: The source and destination color spaces must have the same number of channels.

static · iOS 13.0+

make

TypeScript
static makeSourceFormatDestinationFormatFlags(sourceFormat: vImageCVImageFormat, destinationFormat: vImage_CGImageFormat, options?: vImage_Options): vImageConverter
Swift declaration
static func make(sourceFormat: vImageCVImageFormat, destinationFormat: vImage_CGImageFormat, flags options: vImage.Options = .noFlags) throws -> vImageConverter

Creates a vImage converter that converts a Core Video-formatted image to a Core Graphics-formatted image. - Parameter sourceFormat: A `vImageCVImageFormat` structure describing the image format of the source image - Parameter destinationFormat: A `vImage_CGImageFormat` structure describing the image format of the destination image - Parameter options: The options to use when performing this operation. - Returns: a vImage converter to convert a Core Video-formatted image to a Core Graphics-formatted image.

static · iOS 13.0+

make

TypeScript
static makeSourceFormatDestinationFormatFlags86998(sourceFormat: vImage_CGImageFormat, destinationFormat: vImage_CGImageFormat, options?: vImage_Options): vImageConverter
Swift declaration
static func make(sourceFormat: vImage_CGImageFormat, destinationFormat: vImage_CGImageFormat, flags options: vImage.Options = .noFlags) throws -> vImageConverter

Creates a vImage converter to convert from one vImage Core Graphics image format to another. - Parameter sourceFormat: A `vImage_CGImageFormat` structure describing the image format of the source image - Parameter destinationFormat: A `vImage_CGImageFormat` structure describing the image format of the destination image - Parameter options: The options to use when performing this operation. - Returns: a vImage converter to convert from one vImage Core Graphics image format to another.

static · iOS 13.0+

make

TypeScript
static makeSourceFormatDestinationFormatFlags41767(sourceFormat: vImage_CGImageFormat, destinationFormat: vImageCVImageFormat, options?: vImage_Options): vImageConverter
Swift declaration
static func make(sourceFormat: vImage_CGImageFormat, destinationFormat: vImageCVImageFormat, flags options: vImage.Options = .noFlags) throws -> vImageConverter

Creates a vImage converter that converts a Core Graphics-formatted image to a Core Video-formatted image. - Parameter sourceFormat: A `vImage_CGImageFormat` structure describing the image format of the source image - Parameter destinationFormat: A `vImageCVImageFormat` structure describing the image format of the destination image - Parameter options: The options to use when performing this operation. - Returns: a vImage converter to convert a Core Graphics-formatted image to a Core Video-formatted image.

method · iOS 13.0+

convert

TypeScript
convert(source: vImage_Buffer, destination: vImage_Buffer, options?: vImage_Options): { $ret: null; $out: { "destination": vImage_Buffer } }
Swift declaration
func convert(source: vImage_Buffer, destination: inout vImage_Buffer, flags options: vImage.Options = .noFlags) throws

Converts the pixels in a vImage buffer to another format. - Parameter source: The source buffer. - Parameter destination: The destination buffer. - Parameter options: The options to use when performing this operation. - Returns: `kvImageNoError`; otherwise, one of the error codes described in _Data Types and Constants.

Omit the output parameters from the call. The result contains $ret and $out, with destination inside $out.

Skipped declarations

2 declarations were excluded from these bindings. Each reason comes from the generator or the iOS SDK compiler.

vImageConverter.convert(from:to:)

This declaration needs Swift generic type arguments. (no canonical witness for Src)

vImageConverter.convert(from:to:)

This declaration needs Swift generic type arguments. (no canonical witness for F1)

All Accelerate types →