data
TypeScriptget data(): (SDKHandle) | nullSwift declarationvar data: UnsafeMutableRawPointer!struct · SDK 27.1
struct vImage_Bufferget data(): (SDKHandle) | nullSwift declarationvar data: UnsafeMutableRawPointer!set data(value: (SDKHandle) | null)Swift declarationvar data: UnsafeMutableRawPointer!get height(): numberSwift declarationvar height: vImagePixelCountset height(value: number)Swift declarationvar height: vImagePixelCountget rowBytes(): numberSwift declarationvar rowBytes: Intset rowBytes(value: number)Swift declarationvar rowBytes: Intget width(): numberSwift declarationvar width: vImagePixelCountset width(value: number)Swift declarationvar width: vImagePixelCountstatic initCgImageFlags(cgImage: _CoreGraphics_CGImage, options?: vImage_Options): vImage_BufferSwift declarationinit(cgImage: CGImage, flags options: vImage.Options = .noFlags) throwsInitialize 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.
static initCgImageFormatFlags(cgImage: _CoreGraphics_CGImage, format: vImage_CGImageFormat, options?: vImage_Options): vImage_BufferSwift declarationinit(cgImage: CGImage, format: vImage_CGImageFormat, flags options: vImage.Options = .noFlags) throwsInitialize 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`.
createCGImage(format: vImage_CGImageFormat, options?: vImage_Options): _CoreGraphics_CGImageSwift declarationfunc createCGImage(format: vImage_CGImageFormat, flags options: vImage.Options = .noFlags) throws -> CGImageCreates 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 preferredAlignmentAndRowBytes(width: number, height: number, bitsPerPixel: number): { "alignment": number; "rowBytes": number }Swift declarationstatic 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.
copy(destinationBuffer: vImage_Buffer, pixelSize: number, options?: vImage_Options): { $ret: null; $out: { "destinationBuffer": vImage_Buffer } }Swift declarationfunc copy(destinationBuffer: inout vImage_Buffer, pixelSize: Int, flags options: vImage.Options = .noFlags) throwsCopies 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.
free(): voidSwift declarationfunc free()static initSizeBitsPerPixel(size: { width: number; height: number }, bitsPerPixel: number): vImage_BufferSwift declarationinit(size: CGSize, bitsPerPixel: UInt32) throwsInitializes 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 size(): { width: number; height: number }Swift declarationvar 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.
static initWidthHeightBitsPerPixel(width: number, height: number, bitsPerPixel: number): vImage_BufferSwift declarationinit(width: Int, height: Int, bitsPerPixel: UInt32) throwsInitializes 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.
static initDataHeightWidthRowBytes(data: (SDKHandle) | null, height: number, width: number, rowBytes: number): vImage_BufferSwift declarationinit(data: UnsafeMutableRawPointer!, height: vImagePixelCount, width: vImagePixelCount, rowBytes: Int)static init(): vImage_BufferSwift declarationinit()No declarations were skipped in this snapshot.