---
title: "transform(_:backgroundColor:destination:)"
framework: accelerate
role: symbol
role_heading: Instance Method
path: "accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:destination:)-4wy4q"
---

# transform(_:backgroundColor:destination:)

Applies a Core Graphics affine transformation to an 8-bit planar pixel buffer.

## Declaration

```swift
func transform(_ transform: CGAffineTransform, backgroundColor: Pixel_8? = Pixel_8(0), destination: vImage.PixelBuffer<Format>)
```

## Parameters

- `transform`: The affine transformation matrix.
- `backgroundColor`: An optional background color. If you pass nil, the operation uses the doc://com.apple.accelerate/documentation/Accelerate/kvImageEdgeExtend flag to extend the edges of the image infinitely.
- `destination`: The destination pixel buffer.

## See Also

### Related Documentation

- [Applying geometric transforms to images](accelerate/applying-geometric-transforms-to-images.md)

### Applying affine transformations to images

- [transform(_:backgroundColor:useFloat16Accumulator:destination:)](accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:usefloat16accumulator:destination:)-1470p.md)
- [transform(_:backgroundColor:destination:)](accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:destination:)-1s38.md)
- [transform(_:backgroundColor:useFloat16Accumulator:destination:)](accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:usefloat16accumulator:destination:)-4w4jr.md)
- [transform(_:backgroundColor:destination:)](accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:destination:)-5kxj6.md)
- [transform(_:backgroundColor:destination:)](accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:destination:)-nl6g.md)
- [transform(_:backgroundColor:useFloat16Accumulator:destination:)](accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:usefloat16accumulator:destination:)-1lvaa.md)
- [transform(_:backgroundColor:destination:)](accelerate/vimage/pixelbuffer/transform(_:backgroundcolor:destination:)-9ggt.md)
