Function

vImageOverwriteChannelsWithPixel_ARGB16U(_:_:_:_:_:)

Overwrites an ARGB16U image buffer with the provided pixel value.

Declaration

func vImageOverwriteChannelsWithPixel_ARGB16U(_ the_pixel: UnsafePointer<UInt16>!, _ src: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ copyMask: UInt8, _ flags: vImage_Flags) -> vImage_Error

Parameters

the_pixel

An ARGB pixel value.

src

A pointer to a vImage buffer structure that contains the source image whose data you want to overwrite.

dest

A pointer to a vImage buffer data structure. You're responsible for filling out the height, width, and rowBytes fields of this structure, and for allocating a data buffer of the appropriate size. On return, the data buffer this structure points to contains the destination image data. When you no longer need the data buffer, you must deallocate the memory.

copyMask

An output value that selects the plane (or planes) from the ARGB16U source buffer that you want replaced with the pixel value. The value 0x8 selects the alpha channel, 0x4 the red channel, 0x2 the green channel, and 0x1 the blue channel. You can add these values together to select multiple channels.

flags

The options to use when performing the operation. If you plan to perform your own tiling or use multithreading, pass kvImageDoNotTile.

Return Value

kvImageNoError; otherwise, one of the error codes described in Data Types and Constants.