Contents

AVCapturePhotoBracketSettings

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

Declaration

class AVCapturePhotoBracketSettings

Mentioned in

Overview

To take a bracketed capture, you create and configure an AVCapturePhotoBracketSettings object, using AVCaptureBracketedStillImageSettings objects to describe the individual captures in the bracket, and then pass it to the AVCapturePhotoOutput capturePhoto(with:delegate:) method.

To request a bracketed capture, follow these steps:

  1. Create an array of AVCaptureBracketedStillImageSettings objects describing the number of images to capture in the bracket and the variations on capture settings between them.

  2. Create a bracketed photo settings object with the init(rawPixelFormatType:processedFormat:bracketedSettings:) initializer, passing the array of bracketed still image settings, along with the processed format (such as JPEG) or RAW format to capture images in.

  3. Configure other settings to share across all images in the bracket, such as the isLensStabilizationEnabled property and certain inherited properties.

  1. Initiate capture by passing the bracketed photo settings object to your photo output’s capturePhoto(with:delegate:) method, along with a delegate object to receive messages about the progress and results of the capture.

  1. The photo output calls your delegate’s photoOutput(_:didFinishProcessingPhoto:previewPhoto:resolvedSettings:bracketSettings:error:) or photoOutput(_:didFinishProcessingRawPhoto:previewPhoto:resolvedSettings:bracketSettings:error:) methods many times corresponding to the number of captures in the bracket. Each call provides the AVCaptureBracketedStillImageSettings object indicating which capture in the bracket the captured image corresponds to.

The following code example illustrates capturing a bracket of three RAW images with varying exposure value settings.

Listing 1. Capturing a Multi-Exposure Bracket

Topics

Creating a bracket settings object

Working with bracketed settings

Bracketed settings types

See Also

Photo settings