Function

vImagePremultipliedAlphaBlendWithPermute_ARGB8888(_:_:_:_:_:_:)

Reorders the channels of the top 8-bit, 4-channel, premultiplied image, and blends the image into a bottom premultiplied, ARGB8888 image.

Declaration

func vImagePremultipliedAlphaBlendWithPermute_ARGB8888(_ srcTop: UnsafePointer<vImage_Buffer>, _ srcBottom: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ permuteMap: UnsafePointer<UInt8>, _ makeDestAlphaOpaque: Bool, _ flags: vImage_Flags) -> vImage_Error

Parameters

srcTop

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

srcBottom

A pointer to a vImage buffer structure that contains data for the bottom 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.

permuteMap

Values that can be used to switch the channel order of the source top image.

makeDestAlphaOpaque

A Boolean value that sets destination alpha to 0xFF when true.

flags

The options to use when performing the compositing. 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 permuteMap parameter changes the order of the srcTop channels:

  • permuteMap[0] specifies which channel in srcTop XXXX8888 will be used as A.

  • permuteMap[1] specifies which channel in srcTop XXXX8888 will be used as R.

  • permuteMap[2] specifies which channel in srcTop XXXX8888 will be used as G.

  • permuteMap[3] specifies which channel in srcTop XXXX8888 will be used as B.

See Also

Performing Premultiplied Alpha Compositing With a Permute

func vImagePremultipliedAlphaBlendWithPermute_RGBA8888(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, UnsafePointer<UInt8>, Bool, vImage_Flags) -> vImage_Error

Reorders the channels of the top 8-bit, 4-channel, premultiplied image, and blends the image into a bottom premultiplied, RGBA8888 image.

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