<!--
{
  "availability" : [
    "iOS: 26.0.0 -",
    "iPadOS: 26.0.0 -",
    "macCatalyst: 26.0.0 -",
    "macOS: 26.0.0 -",
    "tvOS: 26.0.0 -",
    "visionOS: 26.0.0 -",
    "watchOS: 26.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "CoreVideo",
  "identifier" : "/documentation/CoreVideo/CVReadOnlyPixelBuffer",
  "metadataVersion" : "0.1.0",
  "role" : "Class",
  "symbol" : {
    "kind" : "Class",
    "modules" : [
      "Core Video"
    ],
    "preciseIdentifier" : "s:9CoreVideo21CVReadOnlyPixelBufferC"
  },
  "title" : "CVReadOnlyPixelBuffer"
}
-->

# CVReadOnlyPixelBuffer

CVReadOnlyPixelBuffer provides an immutable view of the pixel data held by the pixel buffer.

```
final class CVReadOnlyPixelBuffer
```

## Topics

### Initializers

[`init(consuming CVMutablePixelBuffer)`](/documentation/CoreVideo/CVReadOnlyPixelBuffer/init(_:))

Initialize a read-only pixel buffer by consuming a mutable pixel buffer value.

[`init(unsafeBuffer: sending CVPixelBuffer)`](/documentation/CoreVideo/CVReadOnlyPixelBuffer/init(unsafeBuffer:))

Initialize a read-only pixel buffer by transferring existing CVPixelBuffer value.

### Instance Methods

[`func withUnsafeBuffer<R>((CVPixelBuffer) throws -> sending R) rethrows -> sending R`](/documentation/CoreVideo/CVReadOnlyPixelBuffer/withUnsafeBuffer(_:))

## Relationships

### Conforms To

[`Content`](/documentation/CoreMedia/CMSampleBuffer/Content)

[`ViewRepresentable`](/documentation/CoreAI/InferenceValue/ViewRepresentable)

[`Copyable`](/documentation/Swift/Copyable)

[`CVPixelBufferRepresentable`](/documentation/CoreVideo/CVPixelBufferRepresentable)

[`CVBufferRepresentable`](/documentation/CoreVideo/CVBufferRepresentable)

[`SendableMetatype`](/documentation/Swift/SendableMetatype)

[`Escapable`](/documentation/Swift/Escapable)

[`Sendable`](/documentation/Swift/Sendable)

[`CVImageBufferRepresentable`](/documentation/CoreVideo/CVImageBufferRepresentable)

[`ContentWithFormatDescription`](/documentation/CoreMedia/CMSampleBuffer/ContentWithFormatDescription)

---

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)