<!--
{
  "documentType" : "article",
  "framework" : "Accelerate",
  "identifier" : "/documentation/Accelerate/converting-pixel-buffers",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "Converting pixel buffers"
}
-->

# Converting pixel buffers

Convert pixel buffer data between different bit-depths.

## Topics

### Conversion from YUV to RGB

[`func convert(lumaSource: vImage.PixelBuffer<vImage.Planar8>, chromaSource: vImage.PixelBuffer<vImage.Interleaved8x2>, conversionInfo: vImage_YpCbCrToARGB)`](/documentation/Accelerate/vImage/PixelBuffer/convert(lumaSource:chromaSource:conversionInfo:))

Populates the pixel buffer with ARGB data from the given luminance and chrominance pixel buffers.

### Conversion from 8-bit to 16-bit

[`func convert(to: vImage.PixelBuffer<vImage.Planar16F>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-3wpdu)

Converts the contents of the 8-bit planar pixel buffer to floating-point 16-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Fx2>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-4v16)

Converts the contents of the 8-bit-per-channel, 2-channel interleaved pixel buffer to floating-point 16-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Ux4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-9j6eu)

Converts the contents of the 8-bit-per-channel, 4-channel interleaved pixel buffer to unsigned 16-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Fx4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-6ci2d)

Converts the contents of the 8-bit-per-channel, 4-channel interleaved pixel buffer to floating-point 16-bit-per-channel format.

### Conversion from 8-bit to 32-bit

[`func convert(to: vImage.PixelBuffer<vImage.PlanarF>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-7src4)

Converts the contents of the 8-bit planar pixel buffer to 32-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.InterleavedFx3>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-8hivu)

Converts the contents of the 8-bit-per-channel, 3-channel interleaved pixel buffer to 32-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.InterleavedFx4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-1e0nd)

Converts the contents of the 8-bit-per-channel, 4-channel interleaved pixel buffer to 32-bit-per-channel format.

### Conversion from 16-bit to 8-bit

[`func convert(to: vImage.PixelBuffer<vImage.Planar8>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-449hx)

Converts the contents of the floating-point 16-bit planar pixel buffer to 8-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved8x2>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-1h96t)

Converts the contents of the floating-point 16-bit-per-channel, 2-channel interleaved pixel buffer to 8-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved8x4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-k50a)

Converts the contents of the unsigned 16-bit-per-channel, 4-channel interleaved pixel buffer to 8-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved8x4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-9xnxc)

Converts the contents of the floating-point 16-bit-per-channel, 4-channel interleaved pixel buffer to 8-bit-per-channel format.

### Conversion between 16-bit formats

[`func convert(to: vImage.PixelBuffer<vImage.Planar16F>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-1zk6k)

Converts the contents of the unsigned 16-bit planar pixel buffer to floating-point 16-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.Planar16U>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-ip9z)

Converts the contents of the floating-point 16-bit planar pixel buffer to unsigned 16-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Ux2>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-7dx2c)

Converts the contents of the floating-point 16-bit-per-channel, 2-channel interleaved pixel buffer to unsigned 16-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Fx4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-7tdb1)

Converts the contents of the unsigned 16-bit-per-channel, 4-channel interleaved pixel buffer to floating-point 16-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Ux4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-3lg9p)

Converts the contents of the floating-point 16-bit-per-channel, 4-channel interleaved pixel buffer to unsigned 16-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Fx2>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-8u16v)

Converts the contents of the unsigned 16-bit-per-channel, 2-channel interleaved pixel buffer to floating-point 16-bit-per-channel format.

### Conversion from 16-bit to 32-bit

[`func convert(to: vImage.PixelBuffer<vImage.PlanarF>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-4876v)

Converts the contents of the floating-point 16-bit planar pixel buffer to 32-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.InterleavedFx2>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-1xpk2)

Converts the contents of the floating-point 16-bit-per-channel, 2-channel interleaved pixel buffer to 32-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.InterleavedFx4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-674t9)

Converts the contents of the unsigned 16-bit-per-channel, 4-channel interleaved pixel buffer to 32-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.InterleavedFx4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-8ljhz)

Converts the contents of the floating-point 16-bit-per-channel, 4-channel interleaved pixel buffer to 32-bit-per-channel format.

### Conversion from 32-bit to 8-bit

[`func convert(to: vImage.PixelBuffer<vImage.Planar8>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-1ka0r)

Converts the contents of the 32-bit planar pixel buffer to 8-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved8x3>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-69qa2)

Converts the contents of the 32-bit-per-channel, 3-channel interleaved pixel buffer to 8-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved8x4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-24xu0)

Converts the contents of the 32-bit-per-channel, 4-channel interleaved pixel buffer to 8-bit-per-channel format.

### Conversion from 32-bit to 16-bit

[`func convert(to: vImage.PixelBuffer<vImage.Planar16F>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-2bc8n)

Converts the contents of the 32-bit planar pixel buffer to floating-point 16-bit planar format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Fx2>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-56zhe)

Converts the contents of the 32-bit-per-channel, 2-channel interleaved pixel buffer to floating-point 16-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Fx4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-1132q)

Converts the contents of the 32-bit-per-channel, 4-channel interleaved pixel buffer to floating-point 16-bit-per-channel format.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved16Ux4>)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:)-2dbbo)

Converts the contents of the 32-bit-per-channel, 4-channel interleaved pixel buffer to unsigned 16-bit-per-channel format.

### Conversion from four channels to three channels

[`func convert(to: vImage.PixelBuffer<vImage.InterleavedFx3>, channelOrdering: vImage.ChannelOrdering)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:channelOrdering:)-1nll2)

Converts the 32-bit-per-channel RGBA or ARGB pixel buffer to RGB.

[`func convert(to: vImage.PixelBuffer<vImage.Interleaved8x3>, channelOrdering: vImage.ChannelOrdering)`](/documentation/Accelerate/vImage/PixelBuffer/convert(to:channelOrdering:)-9h53)

Converts the 8-bit-per-channel RGBA or ARGB pixel buffer to RGB.



---

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)