<!--
{
  "documentType" : "article",
  "framework" : "VideoToolbox",
  "identifier" : "/documentation/VideoToolbox/VTPixelTransferSession-api-collection",
  "metadataVersion" : "0.1.0",
  "role" : "collectionGroup",
  "title" : "VTPixelTransferSession"
}
-->

# VTPixelTransferSession

An object converts video data from source pixel buffers to destination pixel buffers.

## Discussion

A pixel transfer session supports the copying and/or conversion of images from source pixel buffers to destination pixel buffers. The basic workflow used when working with a pixel transfer session is as follows:

1. Create a pixel transfer session by calling [`VTPixelTransferSessionCreate(allocator:pixelTransferSessionOut:)`](/documentation/VideoToolbox/VTPixelTransferSessionCreate(allocator:pixelTransferSessionOut:)).
2. Optionally, configure the session with your desired [Pixel Transfer Properties](/documentation/VideoToolbox/pixel-transfer-properties) by calling [`VTSessionSetProperty(_:key:value:)`](/documentation/VideoToolbox/VTSessionSetProperty(_:key:value:)) or [`VTSessionSetProperties(_:propertyDictionary:)`](/documentation/VideoToolbox/VTSessionSetProperties(_:propertyDictionary:)).
3. Transfer images by calling [`VTPixelTransferSessionTransferImage(_:from:to:)`](/documentation/VideoToolbox/VTPixelTransferSessionTransferImage(_:from:to:)).
4. When you finish with the pixel transfer session, call [`VTPixelTransferSessionInvalidate(_:)`](/documentation/VideoToolbox/VTPixelTransferSessionInvalidate(_:)) to tear it down, and <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> to free its memory.

## Topics

### Creating Sessions

[`func VTPixelTransferSessionCreate(allocator: CFAllocator?, pixelTransferSessionOut: UnsafeMutablePointer<VTPixelTransferSession?>) -> OSStatus`](/documentation/VideoToolbox/VTPixelTransferSessionCreate(allocator:pixelTransferSessionOut:))

Creates a session for transferring images between Core Video image buffers that hold pixels in main memory.

### Configuring Sessions

[Pixel Transfer Properties](/documentation/VideoToolbox/pixel-transfer-properties)

Properties used to configure a VideoToolbox pixel transfer session.

### Converting Image Data

[`func VTPixelTransferSessionTransferImage(VTPixelTransferSession, from: CVPixelBuffer, to: CVPixelBuffer) -> OSStatus`](/documentation/VideoToolbox/VTPixelTransferSessionTransferImage(_:from:to:))

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

### Inspecting Sessions

[`func VTPixelTransferSessionGetTypeID() -> CFTypeID`](/documentation/VideoToolbox/VTPixelTransferSessionGetTypeID())

Retrieves the Core Foundation type identifier for the pixel transfer session.

### Ending Sessions

[`func VTPixelTransferSessionInvalidate(VTPixelTransferSession)`](/documentation/VideoToolbox/VTPixelTransferSessionInvalidate(_:))

Tears down a pixel transfer session.

### Data Types

[`class VTPixelTransferSession`](/documentation/VideoToolbox/VTPixelTransferSession)

A reference to a VideoToolbox pixel transfer session.



---

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)