<!--
{
  "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/transform(_:backgroundColor:destination:)-9ggt",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Accelerate"
    ],
    "preciseIdentifier" : "s:10Accelerate6vImageO11PixelBufferVAaC14InterleavedFx4VRszrlE9transform_15backgroundColor11destinationySo17CGAffineTransformV_Sf_S3ftSgAEy_AGGtF"
  },
  "title" : "transform(_:backgroundColor:destination:)"
}
-->

# transform(_:backgroundColor:destination:)

Applies a Core Graphics affine transformation to a floating-point 32-bit-per-channel, four-channel interleaved pixel buffer.

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

## Parameters

`transform`

The affine transformation matrix.

`backgroundColor`

An optional background color. If you pass `nil`, the operation uses the [`kvImageEdgeExtend`](/documentation/Accelerate/kvImageEdgeExtend) flag to extend the edges of the image infinitely.

`destination`

The destination pixel buffer.

## See Also

  <doc://com.apple.accelerate/documentation/Accelerate/applying-geometric-transforms-to-images>



---

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)