---
title: "convert(to:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/vimage/pixelbuffer/convert(to:)-449hx"
---

# convert(to:)

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

## Declaration

```swift
func convert(to destination: vImage.PixelBuffer<vImage.Planar8>)
```

## Parameters

- `destination`: The destination pixel buffer.

## Discussion

Discussion This function converts the source values in the range [0.0, 1.0] to the destination range [0, 255]. The conversion clamps source values to the range [0.0, 1.0].

## See Also

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

- [convert(to:)](accelerate/vimage/pixelbuffer/convert(to:)-1h96t.md)
- [convert(to:)](accelerate/vimage/pixelbuffer/convert(to:)-k50a.md)
- [convert(to:)](accelerate/vimage/pixelbuffer/convert(to:)-9xnxc.md)
