---
title: "photoOutput(_:didFinishProcessingPhoto:error:)"
framework: avfoundation
role: symbol
role_heading: Instance Method
path: "avfoundation/avcapturephotocapturedelegate/photooutput(_:didfinishprocessingphoto:error:)"
---

# photoOutput(_:didFinishProcessingPhoto:error:)

Provides the delegate with the captured image and associated metadata resulting from a photo capture.

## Declaration

```swift
optional func photoOutput(_ output: AVCapturePhotoOutput, didFinishProcessingPhoto photo: AVCapturePhoto, error: (any Error)?)
```

## Parameters

- `output`: The photo output performing the capture.
- `photo`: An object containing the captured image pixel buffer, along with any metadata and attachments captured along with the photo (such as a preview image or depth map). This parameter is always non-nil: if an error prevented successful capture, this object still contains metadata for the intended capture.
- `error`: If the capture process could not proceed successfully, an error object describing the failure; otherwise, nil.

## Mentioned in

Capturing photos in RAW and Apple ProRAW formats Tracking photo capture progress Capturing a bracketed photo sequence Capturing and saving Live Photos Capturing photos with depth Capturing thumbnail and preview images Capturing uncompressed image data Saving captured photos

## Discussion

Discussion Use this method to receive the results of photo capture regardless of format. important: Implementing this method is recommended for all still image (as opposed to Live Photo) capture workflows, and required if you request depth data delivery. The photo output validates this requirement when you call its capturePhoto(with:delegate:) method; if your delegate does not implement the correct methods, the photo output raises an exception. The photo output calls this method once for each primary image to be delivered in a capture request. If you request capture in both RAW and processed formats, this method fires once for each format. If you request a bracketed capture with multiple exposures, this method fires once for each exposure.

## See Also

### Receiving capture results

- [photoOutput(_:didFinishRecordingLivePhotoMovieForEventualFileAt:resolvedSettings:)](avfoundation/avcapturephotocapturedelegate/photooutput(_:didfinishrecordinglivephotomovieforeventualfileat:resolvedsettings:).md)
- [photoOutput(_:didFinishProcessingLivePhotoToMovieFileAt:duration:photoDisplayTime:resolvedSettings:error:)](avfoundation/avcapturephotocapturedelegate/photooutput(_:didfinishprocessinglivephototomoviefileat:duration:photodisplaytime:resolvedsettings:error:).md)
- [photoOutput(_:didFinishCapturingDeferredPhotoProxy:error:)](avfoundation/avcapturephotocapturedelegate/photooutput(_:didfinishcapturingdeferredphotoproxy:error:).md)
- [photoOutput(_:didFinishProcessingPhoto:previewPhoto:resolvedSettings:bracketSettings:error:)](avfoundation/avcapturephotocapturedelegate/photooutput(_:didfinishprocessingphoto:previewphoto:resolvedsettings:bracketsettings:error:).md)
- [photoOutput(_:didFinishProcessingRawPhoto:previewPhoto:resolvedSettings:bracketSettings:error:)](avfoundation/avcapturephotocapturedelegate/photooutput(_:didfinishprocessingrawphoto:previewphoto:resolvedsettings:bracketsettings:error:).md)
