---
title: pixelBuffer
framework: avfoundation
role: symbol
role_heading: Instance Property
path: avfoundation/avcapturephoto/pixelbuffer
---

# pixelBuffer

The uncompressed or RAW image sample buffer for the photo, if requested.

## Declaration

```swift
var pixelBuffer: CVPixelBuffer? { get }
```

## Mentioned in

Capturing uncompressed image data

## Discussion

Discussion If you requested photo capture in a RAW format, or in a processed format without compression such as TIFF, you can use this property to access the underlying sample buffer. If you requested capture in a compressed format such as JPEG or HEVC/HEIF, this property’s value is nil. Use the fileDataRepresentation() or cgImageRepresentation() method to obtain compressed image data.

## See Also

### Accessing photo pixel data

- [isRawPhoto](avfoundation/avcapturephoto/israwphoto.md)
