Function

vImageConvert_ARGBFFFFtoPlanar8(_:_:_:_:_:_:_:_:)

Separates an ARGBFFFF image into four Planar8 images.

Declaration

func vImageConvert_ARGBFFFFtoPlanar8(_ src: UnsafePointer<vImage_Buffer>!, _ alpha: UnsafePointer<vImage_Buffer>!, _ red: UnsafePointer<vImage_Buffer>!, _ green: UnsafePointer<vImage_Buffer>!, _ blue: UnsafePointer<vImage_Buffer>!, _ maxFloat: UnsafePointer<Float>!, _ minFloat: UnsafePointer<Float>!, _ flags: vImage_Flags) -> vImage_Error

Parameters

srcARGB

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

alpha

A pointer to a vImage buffer data structure that represents the alpha channel destination. 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. When you no longer need the data buffer, you must deallocate the memory.

red

A pointer to a vImage buffer data structure that represents the red channel destination. 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. When you no longer need the data buffer, you must deallocate the memory.

green

A pointer to a vImage buffer data structure that represents the green channel destination. 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. When you no longer need the data buffer, you must deallocate the memory.

blue

A pointer to a vImage buffer data structure that represents the blue channel destination. 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. When you no longer need the data buffer, you must deallocate the memory.

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.

Discussion

The source image, and the alpha, red, green, and blue destination buffers, must have the same height and the same width. This function works in place for one destination buffer. The others must be allocated separately.

See Also

Converting from ARGB Formats

func vImageConvert_ARGBFFFFtoRGBFFF(UnsafePointer<vImage_Buffer>!, UnsafePointer<vImage_Buffer>!, vImage_Flags) -> vImage_Error

Converts a four-channel ARGBFFFF image to a three-channel RGBFFF image by removing the alpha channel.

func vImageConvert_ARGB8888toRGB888(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, vImage_Flags) -> vImage_Error

Converts a four-channel ARGB8888 image to a three-channel RGB888 image by removing the alpha channel..

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software