---
title: "vImageAlphaBlend_ARGBFFFF(_:_:_:_:)"
framework: accelerate
role: symbol
role_heading: Function
path: "accelerate/vimagealphablend_argbffff(_:_:_:_:)"
---

# vImageAlphaBlend_ARGBFFFF(_:_:_:_:)

Performs nonpremultiplied alpha compositing of two 32-bit-per-channel, 4-channel ARGB buffers.

## Declaration

```swift
func vImageAlphaBlend_ARGBFFFF(_ srcTop: UnsafePointer<vImage_Buffer>, _ srcBottom: UnsafePointer<vImage_Buffer>, _ dest: UnsafePointer<vImage_Buffer>, _ flags: vImage_Flags) -> vImage_Error
```

## Parameters

- `srcTop`: The vImage buffer that provides the source top image.
- `srcBottom`: The vImage buffer that provides the source bottom image.
- `dest`: A pointer to the destination vImage buffer structure. You’re responsible for filling out the doc://com.apple.accelerate/documentation/Accelerate/vImage_Buffer/height, doc://com.apple.accelerate/documentation/Accelerate/vImage_Buffer/width, and doc://com.apple.accelerate/documentation/Accelerate/vImage_Buffer/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, deallocate the memory to prevent memory leaks.
- `flags`: The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass doc://com.apple.accelerate/documentation/Accelerate/kvImageDoNotTile.

## Return Value

Return Value The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass kvImageDoNotTile; otherwise, pass kvImageNoFlags.

## Discussion

Discussion On return of this function, the value of each pixel in the destination buffer is: float alpha =  srcTopAlpha + (1.0 - srcTopAlpha) * srcBottomAlpha float destColor = (  srcTopColor * srcTopAlpha + (1.0 - srcTopAlpha) * srcBottomAlpha * srcBottomColor ) / alpha

## See Also

### Related Documentation

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

### Performing nonpremultiplied alpha compositing

- [vImageAlphaBlend_Planar8(_:_:_:_:_:_:_:)](accelerate/vimagealphablend_planar8(_:_:_:_:_:_:_:).md)
- [vImageAlphaBlend_PlanarF(_:_:_:_:_:_:_:)](accelerate/vimagealphablend_planarf(_:_:_:_:_:_:_:).md)
- [vImageAlphaBlend_ARGB8888(_:_:_:_:)](accelerate/vimagealphablend_argb8888(_:_:_:_:).md)
