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

# VTPixelRotationSession

An object that rotates source pixel buffers to destination pixel buffers.

## Discussion

To create a rotation session, call [`VTPixelRotationSessionCreate(_:_:)`](/documentation/VideoToolbox/VTPixelRotationSessionCreate(_:_:)). Optionally configure the session by calling [`VTSessionSetProperty(_:key:value:)`](/documentation/VideoToolbox/VTSessionSetProperty(_:key:value:)).

To transfer pixels call [`VTPixelRotationSessionRotateImage(_:_:_:)`](/documentation/VideoToolbox/VTPixelRotationSessionRotateImage(_:_:_:)).

When you’re done with the session, call <doc://com.apple.documentation/documentation/CoreFoundation/CFRelease> to tear it down and release your object reference.

## Topics

### Managing a Session

[`func VTPixelRotationSessionCreate(CFAllocator?, UnsafeMutablePointer<VTPixelRotationSession?>) -> OSStatus`](/documentation/VideoToolbox/VTPixelRotationSessionCreate(_:_:))

Creates a session to rotate images between pixel buffers.

[`func VTPixelRotationSessionInvalidate(VTPixelRotationSession)`](/documentation/VideoToolbox/VTPixelRotationSessionInvalidate(_:))

Tears down a pixel rotation session.

### Configuring a Session

[Pixel Rotation Properties](/documentation/VideoToolbox/pixel-rotation-properties)

Properties used to configure a VideoToolbox pixel rotation session.

### Rotating an Image

[`func VTPixelRotationSessionRotateImage(VTPixelRotationSession, CVPixelBuffer, CVPixelBuffer) -> OSStatus`](/documentation/VideoToolbox/VTPixelRotationSessionRotateImage(_:_:_:))

Rotates a source pixel buffer and writes the output to the destination pixel buffer.

### Inspecting the Type Identifier

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

Returns the Core Foundation type identifier for the rotation session.

### Data Types

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

A reference to a pixel rotation 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)