<!--
{
  "availability" : [
    "iOS: 10.0.0 -",
    "iPadOS: 10.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.12.0 -",
    "tvOS: 10.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "PhotoKit",
  "identifier" : "/documentation/Photos/PHLivePhotoFrameProcessingBlock",
  "metadataVersion" : "0.1.0",
  "role" : "Type Alias",
  "symbol" : {
    "kind" : "Type Alias",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:@T@PHLivePhotoFrameProcessingBlock"
  },
  "title" : "PHLivePhotoFrameProcessingBlock"
}
-->

# PHLivePhotoFrameProcessingBlock

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

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

## Discussion

To apply edits to a Live Photo, define a block with this signature and assign it to the [`frameProcessor`](/documentation/Photos/PHLivePhotoEditingContext/frameProcessor) property of a Live Photo editing context. Then call the [`init(livePhotoEditingInput:)`](/documentation/Photos/PHLivePhotoEditingContext/init(livePhotoEditingInput:)) to prepare a preview-quality version of your edits for display, or the [`saveLivePhoto(to:options:completionHandler:)`](/documentation/Photos/PHLivePhotoEditingContext/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:

- frame: A [`PHLivePhotoFrame`](/documentation/Photos/PHLivePhotoFrame) object describing the frame image to be processed.
- error: If your block cannot successfully process the frame, set this pointer to an error object describing the failure.

Your block should return a <doc://com.apple.documentation/documentation/CoreImage/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`](/documentation/Photos/PHLivePhotoFrame/image) property to access the image to be edited.

---

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)