Function

vImageOverwriteChannelsWithScalar_ARGB8888

Overwrites the pixels of one or more planes of an ARGB8888 image buffer with the provided scalar value.

Declaration

vImage_Error vImageOverwriteChannelsWithScalar_ARGB8888(Pixel_8 scalar, const vImage_Buffer *src, const vImage_Buffer *dest, uint8_t copyMask, vImage_Flags flags);

Parameters

scalar

An 8-bit 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 ARGB8888 source buffer that you want replaced with the scalar 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.

See Also

Overwriting with Scalar Values

vImageOverwriteChannelsWithScalar_ARGBFFFF

Overwrites the pixels of one or more planes of an ARGBFFFF image buffer with the provided scalar value.

vImageOverwriteChannelsWithScalar_PlanarF

Overwrites a PlanarF image buffer with the provided value.

vImageOverwriteChannelsWithScalar_Planar8

Overwrites a Planar8 image buffer with the provided value.

vImageOverwriteChannelsWithScalar_Planar16U

Overwrites a Planar16U image buffer with the provided value.

vImageOverwriteChannelsWithScalar_Planar16S

Overwrites a Planar16S image buffer with the provided value.