---
title: "init(from:)"
framework: avfoundation
role: symbol
role_heading: Initializer
path: "avfoundation/avcapturephotosettings/init(from:)"
---

# init(from:)

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

## Declaration

```swift
convenience init(from photoSettings: AVCapturePhotoSettings)
```

## Parameters

- `photoSettings`: The photo settings object from which to copy settings.

## Return Value

Return Value A new photo settings object.

## Discussion

Discussion It is illegal to reuse a AVCapturePhotoSettings instance for multiple captures. Calling the capturePhoto(with:delegate:) method throws an exception if the uniqueID value of the settings parameter matches that of any previously used settings object. To reuse a specific combination of settings, use this initializer to create a new AVCapturePhotoSettings instance from an existing photo settings object. The newly created instance has a new, unique value for its uniqueID property, but copies the values for all other properties from the photoSettings parameter.

## See Also

### Creating photo settings

- [init(format:)](avfoundation/avcapturephotosettings/init(format:).md)
- [init(rawPixelFormatType:)](avfoundation/avcapturephotosettings/init(rawpixelformattype:).md)
- [init(rawPixelFormatType:processedFormat:)](avfoundation/avcapturephotosettings/init(rawpixelformattype:processedformat:).md)
- [init(rawPixelFormatType:rawFileType:processedFormat:processedFileType:)](avfoundation/avcapturephotosettings/init(rawpixelformattype:rawfiletype:processedformat:processedfiletype:).md)
