<!--
{
  "availability" : [
    "iOS: 16.0.0 -",
    "iPadOS: 16.0.0 -",
    "macCatalyst: 16.0.0 -",
    "macOS: 10.8.0 -",
    "tvOS: 16.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTPixelTransferSessionTransferImage(_:from:to:)",
  "metadataVersion" : "0.1.0",
  "role" : "Function",
  "symbol" : {
    "kind" : "Function",
    "modules" : [
      "Video Toolbox"
    ],
    "preciseIdentifier" : "c:@F@VTPixelTransferSessionTransferImage"
  },
  "title" : "VTPixelTransferSessionTransferImage(_:from:to:)"
}
-->

# VTPixelTransferSessionTransferImage(_:from:to:)

Copies and/or converts an image from one pixel buffer to another.

```
func VTPixelTransferSessionTransferImage(_ session: VTPixelTransferSession, from sourceBuffer: CVPixelBuffer, to destinationBuffer: CVPixelBuffer) -> OSStatus
```

## Parameters

`session`

The pixel transfer session.

`sourceBuffer`

The source buffer.

`destinationBuffer`

The destination buffer.

## Return Value

`noErr` if successful or an error code, such as `kVTPixelTransferNotSupportedErr`, if the operation failed.

## Discussion

By default, the full width and height of `sourceBuffer` are scaled to the full width and height of `destinationBuffer`.   By default, all existing attachments on `destinationBuffer` are removed and new attachments are set that describe the transferred image.  Unrecognized attachments on `sourceBuffer` are propagated to destinationBuffer. Some properties modify this behavior; see `VTPixelTransferProperties.h` for more details.

---

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)