Class

AVCapturePhotoSettings

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

Declaration

@interface AVCapturePhotoSettings : NSObject

Overview

To take a photo, you create and configure a AVCapturePhotoSettings object, then pass it to the AVCapturePhotoOutput capturePhotoWithSettings:delegate: method.

A AVCapturePhotoSettings instance can include any combination of settings, regardless of whether that combination is valid for a given capture session. When you initiate a capture by passing a photo settings object to the AVCapturePhotoOutputcapturePhotoWithSettings:delegate: method, the photo capture output validates your settings to ensure deterministic behavior. For example, the flashMode setting must specify a value that is present in the photo output’s supportedFlashModes array. For detailed validation rules, see each property description below.

Topics

Creating Photo Settings

+ photoSettings

Creates a photo settings object with default settings.

+ photoSettingsWithFormat:

Creates a photo settings object with the specified output format.

+ photoSettingsWithRawPixelFormatType:

Creates a photo settings object for RAW-format-only capture with the specified pixel format.

+ photoSettingsWithRawPixelFormatType:processedFormat:

Creates a photo settings object for capture in both RAW format and a processed format.

+ photoSettingsWithRawPixelFormatType:rawFileType:processedFormat:processedFileType:

Creates a photo settings object for capture in both RAW format and a processed format with the specified output file types.

format

A dictionary describing the processed format (for example, JPEG) to deliver captured photos in.

processedFileType

The container file format for eventual output of the processed image.

rawFileType

The container file format for eventual output of the RAW image.

rawPhotoPixelFormatType

An identifier for the Bayer RAW pixel format to deliver captured RAW photos in.

AVFileType

A uniform type identifier for various file formats.

Video Settings Dictionaries

Define output image and video formats by using the key and value constants.

Reusing Photo Settings

+ photoSettingsFromPhotoSettings:

Creates a unique photo settings object, copying all settings values from the specified photo settings object.

Uniquely Identifying a Settings Object

uniqueID

A unique identifier for this photo settings instance.

Enabling Preview and Thumbnail Delivery

previewPhotoFormat

A dictionary describing the format for delivery of preview-sized images alongside the main photo.

availablePreviewPhotoPixelFormatTypes

An array of pixel format types compatible with the photo settings for delivery of preview-sized images.

embeddedThumbnailPhotoFormat

A dictionary describing the format for delivery of thumbnail images embedded in photo file output.

availableRawEmbeddedThumbnailPhotoCodecTypes

An array of video codec types compatible with the photo settings for embedding raw thumbnail images in photo file output.

rawEmbeddedThumbnailPhotoFormat

A dictionary describing the format for delivery of raw thumbnail images embedded in photo file output.

availableEmbeddedThumbnailPhotoCodecTypes

An array of video codec types compatible with the photo settings for embedding thumbnail images in photo file output.

Configuring Photo Settings

flashMode

A setting for whether to fire the flash when capturing photos.

autoRedEyeReductionEnabled

A Boolean value that determines whether to use auto red-eye reduction on flash captures.

highResolutionPhotoEnabled

A Boolean value that specifies whether to capture still images at the highest resolution supported by the active device and format.

cameraCalibrationDataDeliveryEnabled

A Boolean value that determines whether a dual photo capture also delivers camera calibration data.

photoQualityPrioritization

A setting that indicates how to prioritize photo quality against speed of photo delivery.

Beta
autoStillImageStabilizationEnabled

A Boolean value that specifies whether captures use automatic image stabilization.

Deprecated
autoDualCameraFusionEnabled

A Boolean value that specifies whether captures automatically combine data from a dual camera device.

dualCameraDualPhotoDeliveryEnabled

A Boolean value that determines whether a dual camera device delivers images from both cameras.

Configuring Live Photo Settings

livePhotoMovieFileURL

A URL at which to write Live Photo movie output.

livePhotoMovieMetadata

A dictionary containing metadata to be included in the Live Photo movie file.

livePhotoVideoCodecType

The video codec to use for encoding the movie portion of Live Photo output.

Capturing Depth Data

depthDataDeliveryEnabled

A Boolean value that determines whether the photo output captures depth data along with the photo.

embedsDepthDataInPhoto

A Boolean value that determines whether any depth data captured with the photo is included when generating output file data.

depthDataFiltered

A Boolean value that determines whether to smooth noise and fill in missing values in depth data output.

Capturing Portrait Effects Matte

portraitEffectsMatteDeliveryEnabled

Specifies whether a portrait effects matte should be captured along with the photo.

embedsPortraitEffectsMatteInPhoto

Specifies whether the portrait effects matte captured with ths photo should be written to the photo's file structure.

Capturing Semantic Segmentation Mattes

embedsSemanticSegmentationMattesInPhoto

A Boolean value that specifies whether to write the enabled semantic segmentation matte types captured with this photo to the photo’s file structure.

Beta
enabledSemanticSegmentationMatteTypes

An array of semantic segmentation matte types that the photo render pipeline can deliver.

Beta

Embedding Metadata

metadata

A dictionary of metadata keys and values to embed in photo file output.

Relationships

Inherits From

Conforms To

See Also

Capturing a Photo

- capturePhotoWithSettings:delegate:

Initiates a photo capture using the specified settings.

AVCapturePhotoBracketSettings

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

AVCaptureResolvedPhotoSettings

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

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software