A container for image data collected by a photo capture output.


@interface AVCapturePhoto : NSObject


When you capture photos with the AVCapturePhotoOutput class, your delegate object receives each resulting image and related data in the form of an AVCapturePhoto object. This object is an immutable wrapper from which you can retrieve various results of the photo capture.

In addition to the photo image pixel buffer, an AVCapturePhoto object can also contain a preview-sized pixel buffer, capture metadata, and, on supported devices, depth data and camera calibration data. From an AVCapturePhoto object, you can generate data appropriate for writing to a file, such as HEVC encoded image data containerized in the HEIC file format and including a preview image, depth data and other attachments.

An AVCapturePhoto instance wraps a single image result. For example, if you request a bracketed capture of three images, your callback is called three times, each time delivering a single AVCapturePhoto object.


Resolving Photo Capture Requests


The settings object that was used to request this photo capture.


The 1-based index of this photo capture relative to other results from the same capture request.


The time at which the image was captured.

Accessing Photo Pixel Data


A Boolean value indicating whether this photo object contains RAW format data.


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

Accessing Preview Photo Data


A dictionary describing the data format for a preview-sized image accompanying the captured photo.


The pixel data for a preview-sized version of the photo, if requested.

Accessing Photo Metadata


Depth or disparity map data captured with the photo.


A container for per-pixel distance or disparity information captured by compatible camera devices.


Calibration information for the camera device that captured the photo.


Information about the camera characteristics used to capture images and depth data.


The type of device that captured the photo.


A dictionary of metadata describing the captured image.


The portrait effects matte captured with the photo.

Packaging Data for File Output


A set of delegate callbacks to be implemented by callers of fileDataRepresentationWithCustomizer:.

- fileDataRepresentation

Generates and returns a flat data representation of the photo and its attachments.

- CGImageRepresentation

Extracts and returns the captured photo's primary image as a Core Graphics image object.

- previewCGImageRepresentation

Extracts and returns the captured photo's preview image as a CoreGraphics image object.

- fileDataRepresentationWithReplacementMetadata:replacementEmbeddedThumbnailPhotoFormat:replacementEmbeddedThumbnailPixelBuffer:replacementDepthData:

Generates and returns a flat data representation of the photo, using the specified replacements for some or all of its attachments.


Examining Bracketed Capture Information


The variations available for bracketed capture settings for this photo.


The 1-based index of this photo in a bracketed capture sequence.


Information about the use of lens stabilization during bracketed photo capture.


Constants that indicate the status of optical image stabilization hardware during a bracketed photo capture.

Accessing Segmentation Mattes

- semanticSegmentationMatteForType:

Retrieves the semantic segmentation matte associated with this photo.


Inherits From

See Also

Photo Capture

Capturing Still and Live Photos

Configure and capture single or multiple still images, Live Photos, and other forms of photography.

Supporting Continuity Camera in Your Mac App

Incorporate scanned documents and pictures taken with a user's iPhone, iPad, or iPod touch into your Mac app using Continuity Camera.


A capture output for still image, Live Photo, and other photography workflows.


Methods for monitoring progress and receiving results from a photo capture output.