Function

vImagePremultiplyData_ARGB16U(_:_:_:)

Transforms an ARGB16U image in nonpremultiplied alpha format, along with alpha information, into an image in premultiplied alpha format.

Declaration

func vImagePremultiplyData_ARGB16U(_ src: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ flags: vImage_Flags) -> vImage_Error

Parameters

src

A pointer to a vImage buffer structure that contains the nonpremultiplied data for the top source image.

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.

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

This function gets the required alpha information from the alpha channel of the original image. The alpha channel is copied over unchanged to the destination image.

See Also

Converting from Unpremultiplied to Premultiplied Format

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

Transforms an ARGBFFFF image in nonpremultiplied alpha format into an image in premultiplied alpha format.

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

Transforms an ARGB8888 image in nonpremultiplied alpha format into an image in premultiplied alpha format.

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

Transforms an ARGB16Q12 image in nonpremultiplied alpha format, along with alpha information, into an image in premultiplied alpha format.

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

Transforms an RGBAFFFF image in nonpremultiplied alpha format into an image in premultiplied alpha format.

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

Transforms an RGBA8888 image in nonpremultiplied alpha format into an image in premultiplied alpha format.

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

Transforms an RGBA16U image in nonpremultiplied alpha format, along with alpha information, into an image in premultiplied alpha format.

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

Transforms an RGBA16Q12U image in nonpremultiplied alpha format, along with alpha information, into an image in premultiplied alpha format.

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

Transforms a PlanarF image in nonpremultiplied alpha format, along with alpha information, into an image in premultiplied alpha format.

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

Transforms a Planar8 image in nonpremultiplied alpha format, along with alpha information, into an image in premultiplied alpha format.

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