<!--
{
  "availability" : [
    "iOS: -",
    "iPadOS: -",
    "macCatalyst: -",
    "macOS: -",
    "tvOS: -",
    "visionOS: -",
    "watchOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImageConvert_PlanarFToRGBX8888",
  "metadataVersion" : "0.1.0",
  "role" : "Macro",
  "symbol" : {
    "kind" : "Macro",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "c:@macro@vImageConvert_PlanarFToRGBX8888"
  },
  "title" : "vImageConvert_PlanarFToRGBX8888"
}
-->

# vImageConvert_PlanarFToRGBX8888

Interleaves three 32-bit planar buffers into an 8-bit-per-channel, 4-channel interleaved RGBX buffer with the specified constant alpha value.

```
#define vImageConvert_PlanarFToRGBX8888(_red, _green, _blue, _alpha, _dest, _maxFloat, _minFloat, _flags)
```

## Parameters

`_red`

The source vImage buffer that contains the red channel.

`_green`

The source vImage buffer that contains the green channel.

`_blue`

The source vImage buffer that contains the blue channel.

`_alpha`

The constant destination alpha value.

`_dest`

A pointer to the destination vImage buffer structure. You’re responsible for filling out the [`height`](/documentation/Accelerate/vImage_Buffer/height), [`width`](/documentation/Accelerate/vImage_Buffer/width), and [`rowBytes`](/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.

`_maxFloat`

A group of maximum pixel values, one per channel, in the same order as in the output pixels. The function clips larger values to these values in the destination image.

`_minFloat`

A group of minimum pixel values, one per channel, in the same order as in the output pixels. The function clips smaller values to these values in the destination image.

`_flags`

The options to use when performing the operation. If your code implements its own tiling or its own multithreading, pass [`kvImageDoNotTile`](/documentation/Accelerate/kvImageDoNotTile); otherwise, pass [`kvImageNoFlags`](/documentation/Accelerate/kvImageNoFlags).

## Return Value

[`kvImageNoError`](/documentation/Accelerate/kvImageNoError); otherwise, one of the error codes in <doc://com.apple.documentation/documentation/Accelerate/data-types-and-constants>.

## Discussion

The function uses the following calculation to perform the conversion:

```objc
uint8_t result = SATURATED_CLIP_0_to_255( 255.0f * ( srcPixel - minFloat ) / (maxFloat - minFloat) + 0.5f );
```

---

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)