---
title: "premultipliedAlphaBlend(_:topLayer:destination:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/vimage/pixelbuffer/premultipliedalphablend(_:toplayer:destination:)"
---

# 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

```swift
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

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

## See Also

### Related Documentation

- [Compositing images with alpha blending](accelerate/compositing-images-with-alpha-blending.md)

### Alpha blending

- [vImage.BlendMode](accelerate/vimage/blendmode.md)
