Class

AVCaptureResolvedPhotoSettings

A description of the features and settings in use for an in-progress or complete photo capture request.

Declaration

class AVCaptureResolvedPhotoSettings : NSObject

Overview

When you request a photo capture using the AVCapturePhotoOutput capturePhoto(with:delegate:) method, you describe the settings for that capture request in an AVCapturePhotoSettings object. When the capture begins, the photo output calls your delegate methods and provides an AVCaptureResolvedPhotoSettings object detailing the settings that are in effect for that capture. Resolved photo settings objects are immutable; they describe a request that has already been made.

The uniqueID property of a resolved photo settings object passed to one of your AVCapturePhotoCaptureDelegate methods matches the uniqueID value of the AVCapturePhotoSettings object you passed when requesting capture. Use this value to determine which delegate method calls correspond to which capture requests.

Some photo capture settings are automatic, such as the flashMode property. For such settings, the photo output determines whether to use that feature at the moment of capture—you don’t know when requesting a capture whether the feature is active when the capture completes. When the photo output calls your delegate methods, the provided AVCaptureResolvedPhotoSettings object details which automatic features have been set for that capture.

Likewise, the dimensions of an output image or movie may not be set until the moment of capture. For example, when you specify a thumbnail size with the previewPhotoFormat setting, the photo output chooses dimensions that best match your requested size while preserving the aspect ratio of the captured photo. When the photo output calls your delegate methods, use the previewDimensions property of the resolved settings to find the actual preview image dimensions. See the methods listed in Examining Output Dimensions for other cases where output dimensions can change at capture time.

Topics

Resolving Photo Capture Requests

var uniqueID: Int64

The unique identifier for the photo capture this settings object corresponds to.

var expectedPhotoCount: Int

The number of photo capture results in the capture request.

Examining Photo Capture Settings

var isFlashEnabled: Bool

A Boolean value indicating whether the camera flash will fire or has fired for this capture.

var isStillImageStabilizationEnabled: Bool

A Boolean value indicating whether this capture uses image stabilization.

Deprecated
var isDualCameraFusionEnabled: Bool

A Boolean value indicating whether this capture combines image data from a dual camera.

Deprecated
var isRedEyeReductionEnabled: Bool

A Boolean value indicating whether the camera automatically reduces red-eye when capturing photos.

Examining Output Dimensions

var photoDimensions: CMVideoDimensions

The size, in pixels, of the photo image (in a processed format such as JPEG) delivered by this capture.

var rawPhotoDimensions: CMVideoDimensions

The size, in pixels, of the RAW-format photo image delivered by this capture.

var previewDimensions: CMVideoDimensions

The size, in pixels, of the preview image delivered along with this capture.

var embeddedThumbnailDimensions: CMVideoDimensions

The size, in pixels, of the thumbnail image delivered in this capture.

var rawEmbeddedThumbnailDimensions: CMVideoDimensions

The size, in pixels, of the RAW-format embedded thumbnail image delivered by this capture.

var livePhotoMovieDimensions: CMVideoDimensions

The size, in pixels, of the Live Photo movie content delivered by this capture.

var portraitEffectsMatteDimensions: CMVideoDimensions

The size, in pixels, of the portrait effects matte delivered by this capture.

Relationships

Inherits From

Conforms To

See Also

Capturing a Photo

class AVCapturePhotoSettings

A specification of the features and settings to use for a single photo capture request.

class AVCapturePhotoBracketSettings

A specification of the features and settings to use for a photo capture request that captures multiple images with varied settings.