---
title: PHLivePhotoFrameProcessingBlock
framework: photos
role: symbol
role_heading: Type Alias
path: photos/phlivephotoframeprocessingblock
---

# PHLivePhotoFrameProcessingBlock

The signature for a block Photos calls to process Live Photo frames.

## Declaration

```swift
typealias PHLivePhotoFrameProcessingBlock = (any PHLivePhotoFrame, NSErrorPointer) -> CIImage?
```

## Discussion

Discussion To apply edits to a Live Photo, define a block with this signature and assign it to the frameProcessor property of a Live Photo editing context. Then call the init(livePhotoEditingInput:) to prepare a preview-quality version of your edits for display, or the saveLivePhoto(to:options:completionHandler:) method to produce full-quality final output. When you call one of those methods, Photos calls your frame processor block repeatedly—processing each frame of the Live Photo’s video content as well as its still photo content—to render the output. This block takes the following parameters: Your block should return a CIImage object representing the result of your edits, or nil to indicate that your image processing has failed and the Live Photo edit should be aborted. Use the frame parameter’s image property to access the image to be edited.

## See Also

### Preparing an Editing Context for Processing

- [frameProcessor](photos/phlivephotoeditingcontext/frameprocessor.md)
- [audioVolume](photos/phlivephotoeditingcontext/audiovolume.md)
