<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: -",
    "macOS: 13.0.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: -",
    "watchOS: 9.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/vImage/PixelBuffer/init(planarBuffers:)-n2mq",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate6vImageO11PixelBufferVAaC14InterleavedFx2VRszrlE13planarBuffersAEy_AGGSayAEy_AC7PlanarFVGG_tcfc"
  },
  "title" : "init(planarBuffers:)"
}
-->

# init(planarBuffers:)

Creates a 2-channel, 32-bit-per-channel interleaved buffer from two 32-bit planar buffers.

```
init(planarBuffers: [vImage.PixelBuffer<vImage.PlanarF>])
```

## Parameters

`planarBuffers`

An array that contains two 32-bit planar buffers.

## Discussion

Use this function to interleave two discrete planar buffers. For example, the following code creates a two-channel buffer from two planar buffers:

```swift
let planar0 = vImage.PixelBuffer<vImage.PlanarF>(
    pixelValues: [Float(0.125), Float(0.5)],
    size: vImage.Size(width: 2, height: 1))

let planar1 = vImage.PixelBuffer<vImage.PlanarF>(
    pixelValues: [Float(0.25), Float(1)],
    size: vImage.Size(width: 2, height: 1))

let interleaved = vImage.PixelBuffer<vImage.InterleavedFx2>(
    planarBuffers: [planar0, planar1])

// Prints "[0.125, 0.25, 0.5, 1]"
print(interleaved.array)
```

---

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)