Function

vImageConvert_RGBFFFtoBGRAFFFF(_:_:_:_:_:_:)

Converts a three-channel RGBFFF image to a four-channel BGRAFFFF image, with optional premultiplication.

Declaration

func vImageConvert_RGBFFFtoBGRAFFFF(_: UnsafePointer<vImage_Buffer>, _: UnsafePointer<vImage_Buffer>!, _: Pixel_F, _: UnsafePointer<vImage_Buffer>, _: Bool, _ flags: vImage_Flags) -> vImage_Error

Parameters

parameter 1

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

parameter 2

A pointer to a vImage buffer structure that contains a Planar8 alpha plane to use as the alpha values in the destination image. If you pass NULL, the function assigns the value of the alpha parameter for all pixels in the destination image.

parameter 3

An alpha value for all pixels in the destination image. The function ignores this value if the aSrc parameter is not NULL.

parameter 4

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 converted image data. When you no longer need the data buffer, you must deallocate the memory.

parameter 5

Pass true if the data should be premultiplied by the alpha value; otherwise false.

parameter 6

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

This function doesn't work in place.

See Also

Converting from RGB Formats

func vImageConvert_RGB565toRGBA5551(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, Int32, vImage_Flags) -> vImage_Error

Converts an RGB565 image to an RGBA5551 image with dithering, setting destination alpha to one.

func vImageConvert_RGB565toARGB1555(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, Int32, vImage_Flags) -> vImage_Error

Converts an RGB565 image to an ARGB1555 image with dithering, setting destination alpha to one.