Class

AVCapturePhoto

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

Declaration

@interface AVCapturePhoto : NSObject

Overview

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.

Topics

Resolving Photo Capture Requests

resolvedSettings

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

photoCount

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

timestamp

The time at which the image was captured.

Accessing Photo Pixel Data

rawPhoto

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

pixelBuffer

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

Accessing Preview Photo Data

embeddedThumbnailPhotoFormat

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

previewPixelBuffer

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

Accessing Photo Metadata

depthData

Depth or disparity map data captured with the photo.

AVDepthData

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

cameraCalibrationData

Calibration information for the camera device that captured the photo.

AVCameraCalibrationData

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

sourceDeviceType

The type of device that captured the photo.

metadata

A dictionary of metadata describing the captured image.

portraitEffectsMatte

The portrait effects matte captured with the photo.

Packaging Data for File Output

AVCapturePhotoFileDataRepresentationCustomizer

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.

Deprecated

Examining Bracketed Capture Information

bracketSettings

The variations available for bracketed capture settings for this photo.

sequenceCount

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

lensStabilizationStatus

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

AVCaptureLensStabilizationStatus

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.

Relationships

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.

AVCapturePhotoOutput

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

AVCapturePhotoCaptureDelegate

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