One Logo Pool Ball
Accelerate · IOS API REFERENCE

vImage_Buffer

struct · SDK 27.1

struct vImage_Buffer

Members (19)

get

data

TypeScript
get data(): (SDKHandle) | null
Swift declaration
var data: UnsafeMutableRawPointer!
set

data

TypeScript
set data(value: (SDKHandle) | null)
Swift declaration
var data: UnsafeMutableRawPointer!
get

height

TypeScript
get height(): number
Swift declaration
var height: vImagePixelCount
set

height

TypeScript
set height(value: number)
Swift declaration
var height: vImagePixelCount
get

rowBytes

TypeScript
get rowBytes(): number
Swift declaration
var rowBytes: Int
set

rowBytes

TypeScript
set rowBytes(value: number)
Swift declaration
var rowBytes: Int
get

width

TypeScript
get width(): number
Swift declaration
var width: vImagePixelCount
set

width

TypeScript
set width(value: number)
Swift declaration
var width: vImagePixelCount
init · iOS 13.0+

init

TypeScript
static initCgImageFlags(cgImage: _CoreGraphics_CGImage, options?: vImage_Options): vImage_Buffer
Swift declaration
init(cgImage: CGImage, flags options: vImage.Options = .noFlags) throws

Initialize a vImage buffer with the contents of a Core Graphics image. - Parameter cgImage: A `CGImage` instance to be used as the source. - Parameter options: The options to use when performing this operation. - Returns: An initialized vImage buffer. This function will instantiate and initialize a vImage buffer from a `CGImage` using a `CGImageFormat` based on the provided image's properties.

init · iOS 13.0+

init

TypeScript
static initCgImageFormatFlags(cgImage: _CoreGraphics_CGImage, format: vImage_CGImageFormat, options?: vImage_Options): vImage_Buffer
Swift declaration
init(cgImage: CGImage, format: vImage_CGImageFormat, flags options: vImage.Options = .noFlags) throws

Initialize a vImage buffer with the contents of a Core Graphics image, using a supplied format. - Parameter cgImage: A `CGImage` instance to be used as the source. - Parameter format: A `vImage_CGImageFormat` that describes the source image/ - Parameter options: The options to use when performing this operation. - Returns: An initialized vImage buffer. This function will instantiate and initialize a vImage buffer from a `CGImage` using a provided `CGImageFormat`.

method · iOS 13.0+

createCGImage

TypeScript
createCGImage(format: vImage_CGImageFormat, options?: vImage_Options): _CoreGraphics_CGImage
Swift declaration
func createCGImage(format: vImage_CGImageFormat, flags options: vImage.Options = .noFlags) throws -> CGImage

Creates a `CGImage` instance from a vImage buffer - Parameter format: The image format of this vImage buffer. - Parameter options: The options to use when performing this operation. - Returns: A Core Graphics image containing a representation of the vImage buffer.

static · iOS 13.0+

preferredAlignmentAndRowBytes

TypeScript
static preferredAlignmentAndRowBytes(width: number, height: number, bitsPerPixel: number): { "alignment": number; "rowBytes": number }
Swift declaration
static func preferredAlignmentAndRowBytes(width: Int, height: Int, bitsPerPixel: UInt32) throws -> (alignment: Int, rowBytes: Int)

Returns the preferred alignment and row bytes for a specified buffer size and bits-per-pixel. - Parameter width: The width of the buffer. - Parameter height: The height of the buffer. - Parameter bitsPerPixel: The number of bits in a pixel of image data. - Returns: The preferred alignment and row bytes.

method · iOS 13.0+

copy

TypeScript
copy(destinationBuffer: vImage_Buffer, pixelSize: number, options?: vImage_Options): { $ret: null; $out: { "destinationBuffer": vImage_Buffer } }
Swift declaration
func copy(destinationBuffer: inout vImage_Buffer, pixelSize: Int, flags options: vImage.Options = .noFlags) throws

Copies this buffer to `destinationBuffer`. - Parameter destinationBuffer: The destination vImage buffer. - Parameter pixelSize: The number of bytes for one pixel. - Parameter options: The options to use when performing this operation.

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

method · iOS 13.0+

free

TypeScript
free(): void
Swift declaration
func free()
init · iOS 14.0+

init

TypeScript
static initSizeBitsPerPixel(size: { width: number; height: number }, bitsPerPixel: number): vImage_Buffer
Swift declaration
init(size: CGSize, bitsPerPixel: UInt32) throws

Initializes a vImage buffer of a specified size. - Parameter size: The size of the buffer. - Parameter bitsPerPixel: The number of bits in a pixel of image data. - Returns: An initialized vImage buffer.

get · iOS 13.0+

size

TypeScript
get size(): { width: number; height: number }
Swift declaration
var size: CGSize { get }

The size of the vImage buffer. The `CGSize` is rounded down to the nearest representable `CGFloat` that is less than or equal to the actual size of the image. In practice the conversion will always be exact, except for really big images. In that case, some part of the bottom or right edge might be truncated.

init · iOS 13.0+

init

TypeScript
static initWidthHeightBitsPerPixel(width: number, height: number, bitsPerPixel: number): vImage_Buffer
Swift declaration
init(width: Int, height: Int, bitsPerPixel: UInt32) throws

Initializes a vImage buffer of a specified size. - Parameter width: The width of the buffer. - Parameter height: The height of the buffer. - Parameter bitsPerPixel: The number of bits in a pixel of image data. - Returns: An initialized vImage buffer.

init

init

TypeScript
static initDataHeightWidthRowBytes(data: (SDKHandle) | null, height: number, width: number, rowBytes: number): vImage_Buffer
Swift declaration
init(data: UnsafeMutableRawPointer!, height: vImagePixelCount, width: vImagePixelCount, rowBytes: Int)
init

init

TypeScript
static init(): vImage_Buffer
Swift declaration
init()

Skipped declarations

No declarations were skipped in this snapshot.

All Accelerate types →