<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/functions-that-add-an-alpha-channel-to-three-channel-buffers",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Functions that add an alpha channel to three-channel buffers"
}
-->

# Functions that add an alpha channel to three-channel buffers

Add a constant alpha value or planar alpha buffer to an RGB image.

## Topics

### Conversion from 8-bit-per-channel, 3-channel interleaved buffers

[`func vImageConvert_RGB888toARGB8888(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_8, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB888toARGB8888(_:_:_:_:_:_:))

Combines an 8-bit-per-channel, 3-channel RGB buffer and either an 8-bit alpha buffer or constant alpha value to produce an ARGB result.

[`#define vImageConvert_BGR888toBGRA8888(_bgrSrc, _aSrc, _alpha, _bgraDest, _premultiply, _flags)`](/documentation/Accelerate/vImageConvert_BGR888toBGRA8888)

Combines an 8-bit-per-channel, 3-channel BGR buffer and either an 8-bit alpha buffer or constant alpha value to produce a BGRA result.

[`func vImageConvert_RGB888toBGRA8888(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_8, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB888toBGRA8888(_:_:_:_:_:_:))

Combines an 8-bit-per-channel, 3-channel RGB buffer and either an 8-bit alpha buffer or constant alpha value to produce a BGRA result.

[`#define vImageConvert_BGR888toRGBA8888(_bgrSrc, _aSrc, _alpha, _rgbaDest, _premultiply, _flags)`](/documentation/Accelerate/vImageConvert_BGR888toRGBA8888)

Combines an 8-bit-per-channel, 3-channel BGR buffer and either an 8-bit alpha buffer or constant alpha value to produce an RGBA result.

[`func vImageConvert_RGB888toRGBA8888(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_8, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB888toRGBA8888(_:_:_:_:_:_:))

Combines an 8-bit-per-channel, 3-channel RGB buffer and either an 8-bit alpha buffer or constant alpha value to produce an RGBA result.

### Conversion from unsigned 16-bit-per-channel, 3-channel interleaved buffers

[`func vImageConvert_RGB16UToARGB8888(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, UnsafePointer<UInt8>, UInt8, UnsafePointer<UInt8>, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB16UToARGB8888(_:_:_:_:_:_:))

Converts an unsigned 16-bit-per-channel, 3-channel interleaved buffer to an 8-bit-per-channel, 4-channel interleaved buffer using permutation.

[`func vImageConvert_RGB16UtoARGB16U(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_16U, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB16UtoARGB16U(_:_:_:_:_:_:))

Combines an unsigned 16-bit-per-channel, 3-channel RGB buffer and either an unsigned 16-bit alpha buffer or constant alpha value to produce an ARGB result.

[`func vImageConvert_RGB16UtoBGRA16U(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_16U, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB16UtoBGRA16U(_:_:_:_:_:_:))

Combines an unsigned 16-bit-per-channel, 3-channel RGB buffer and either an unsigned 16-bit alpha buffer or constant alpha value to produce a BGRA result.

[`func vImageConvert_RGB16UtoRGBA16U(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_16U, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB16UtoRGBA16U(_:_:_:_:_:_:))

Combines an unsigned 16-bit-per-channel, 3-channel RGB buffer and either an unsigned 16-bit alpha buffer or constant alpha value to produce an RGBA result.

### Conversion from RGB565 16-bit-per-channel, 3-channel interleaved buffers

[`func vImageConvert_RGB565toARGB8888(Pixel_8, UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB565toARGB8888(_:_:_:_:))

Combines an RGB565 3-channel RGB buffer and a constant alpha value to produce an 8-bit-per-channel, 4-channel ARGB buffer.

[`func vImageConvert_RGB565toBGRA8888(Pixel_8, UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB565toBGRA8888(_:_:_:_:))

Combines an RGB565 3-channel RGB buffer and a constant alpha value to produce an 8-bit-per-channel, 4-channel BGRA buffer.

[`func vImageConvert_RGB565toRGBA8888(Pixel_8, UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB565toRGBA8888(_:_:_:_:))

Combines an RGB565 3-channel RGB buffer and a constant alpha value to produce an 8-bit-per-channel, 4-channel RGBA buffer.

[`func vImageConvert_RGB565toARGB1555(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, Int32, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB565toARGB1555(_:_:_:_:))

Combines an RGB565 3-channel RGB buffer and a constant alpha value to produce a 4-channel ARGB1555 buffer.

[`func vImageConvert_RGB565toRGBA5551(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>, Int32, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGB565toRGBA5551(_:_:_:_:))

Combines an RGB565 3-channel RGB buffer and a constant alpha value to produce a 4-channel RGBA5551 buffer.

### Conversion from 32-bit-per-channel, 3-channel interleaved buffers

[`func vImageConvert_RGBFFFtoARGBFFFF(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_F, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGBFFFtoARGBFFFF(_:_:_:_:_:_:))

Combines a floating-point 32-bit-per-channel, 3-channel RGB buffer and either an 32-bit alpha buffer or constant alpha value to produce an ARGB result.

[`func vImageConvert_RGBFFFtoBGRAFFFF(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_F, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGBFFFtoBGRAFFFF(_:_:_:_:_:_:))

Combines a floating-point 32-bit-per-channel, 3-channel RGB buffer and either an 32-bit alpha buffer or constant alpha value to produce a BGRA result.

[`func vImageConvert_RGBFFFtoRGBAFFFF(UnsafePointer<vImage_Buffer>, UnsafePointer<vImage_Buffer>!, Pixel_F, UnsafePointer<vImage_Buffer>, Bool, vImage_Flags) -> vImage_Error`](/documentation/Accelerate/vImageConvert_RGBFFFtoRGBAFFFF(_:_:_:_:_:_:))

Combines a floating-point 32-bit-per-channel, 3-channel RGB buffer and either an 32-bit alpha buffer or constant alpha value to produce an RGBA result.



---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)