Function

vImageUnpremultiplyData_RGBA16Q12(_:_:_:)

Transforms a RGBA16Q12 image in premultiplied alpha format it into an image in nonpremultiplied alpha format.

Declaration

func vImageUnpremultiplyData_RGBA16Q12(_ 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 premultiplied data for the 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 Premultiplied to Unpremultiplied Format

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

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

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

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

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

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

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

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

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

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

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

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

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

Transforms a RGBA16U image in premultiplied alpha format into an image in nonpremultiplied alpha format.

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

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

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

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