<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 14.0.0 -",
    "macOS: 10.15.0 -",
    "tvOS: 17.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "AVFoundation",
  "identifier" : "/documentation/AVFoundation/AVCapturePhotoSettings/init(format:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "AVFoundation"
    ],
    "preciseIdentifier" : "c:objc(cs)AVCapturePhotoSettings(cm)photoSettingsWithFormat:"
  },
  "title" : "init(format:)"
}
-->

# init(format:)

Creates a photo settings object with the specified output format.

```
convenience init(format: [String : Any]?)
```

## Parameters

`format`

A dictionary of Core Video pixel buffer attributes or AVFoundation video settings constants (see Video Settings).

    To capture a photo in an uncompressed format, such as 420f, 420v, or BGRA, set the key     <doc://com.apple.documentation/documentation/CoreVideo/kCVPixelBufferPixelFormatTypeKey>     in the     `format`     dictionary. The corresponding value must be one of the pixel format identifiers listed in the [`availablePhotoPixelFormatTypes`](/documentation/AVFoundation/AVCapturePhotoOutput/availablePhotoPixelFormatTypes-6eyb)     array of your photo capture output.

    To capture a photo in a compressed format, such as JPEG, set the key [`AVVideoCodecKey`](/documentation/AVFoundation/AVVideoCodecKey)     in the     `format`     dictionary. The corresponding value must be one of the codec identifiers listed in the [`availablePhotoCodecTypes`](/documentation/AVFoundation/AVCapturePhotoOutput/availablePhotoCodecTypes)     array of your photo capture output. For a compressed format, you can also specify a compression level with the key [`AVVideoQualityKey`](/documentation/AVFoundation/AVVideoQualityKey)    .

## Return Value

A new photo settings object.

## Discussion

Requesting capture in a processed format adds requirements for other photo settings: for details, see the [`format`](/documentation/AVFoundation/AVCapturePhotoSettings/format) property. The capture output validates these requirements when you call the [`capturePhoto(with:delegate:)`](/documentation/AVFoundation/AVCapturePhotoOutput/capturePhoto(with:delegate:)) method. If your settings and delegate don’t meet these requirements, that method raises an exception.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)