Contents

premultipliedAlphaBlend(_:topLayer:destination:)

Performs alpha compositing of two 4-channel interleaved RGBA 8-bit pixel buffers using the specified blend mode to produce a premultiplied result.

Declaration

func premultipliedAlphaBlend(_ blendMode: vImage.BlendMode, topLayer: vImage.PixelBuffer<Format>, destination: vImage.PixelBuffer<Format>)

Parameters

  • blendMode:

    The blend mode.

  • topLayer:

    The blend top layer.

  • destination:

    The destination pixel buffer.

Discussion

This function treats self as the bottom layer and both pixel buffers must have alpha as their last channel.

See Also

Related Documentation

Alpha blending