<!--
{
  "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/PHLivePhotoEditingContext/frameProcessor",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Property",
  "symbol" : {
    "kind" : "Instance Property",
    "modules" : [
      "Photos"
    ],
    "preciseIdentifier" : "c:objc(cs)PHLivePhotoEditingContext(py)frameProcessor"
  },
  "title" : "frameProcessor"
}
-->

# frameProcessor

A block to be called by Photos for processing each frame of the Live Photo’s visual content.

```
var frameProcessor: PHLivePhotoFrameProcessingBlock? { get set }
```

## Discussion

Use this property to define the image processing to be performed on each frame of the Live Photo. Setting this property does not begin processing; instead, after you call one of the methods listed in Processing an Editing Context’s Live Photo, Photos executes your block repeatedly to process each frame of the Live Photo’s video and still photo content.

In your frame processor block, use the [`image`](/documentation/Photos/PHLivePhotoFrame/image) property of the provided [`PHLivePhotoFrame`](/documentation/Photos/PHLivePhotoFrame) object to access the image to be processed, and return a <doc://com.apple.documentation/documentation/CoreImage/CIImage> object representing the result of your processing. For example, the following code sets up a processor block to apply a simple sepia-tone filter, then calls the [`saveLivePhoto(to:options:completionHandler:)`](/documentation/Photos/PHLivePhotoEditingContext/saveLivePhoto(to:options:completionHandler:)) method to begin processing the Live Photo for output.

```swift
 
func processLivePhoto(input: PHContentEditingInput) {
    guard let context = PHLivePhotoEditingContext(livePhotoEditingInput: input)
        else { fatalError("not a Live Photo editing input") }
    context.frameProcessor = { frame, _ in
        return frame.image.applyingFilter("CISepiaTone", withInputParameters: nil)
    }
    let output = PHContentEditingOutput(contentEditingInput: input)
    context.saveLivePhoto(to: output) { success, error in
        if success {
            // use output with PHAssetChangeRequest or PHContentEditingController
        } else {
            print("can't process live photo: \(error)")
        }
    }
}
```

---

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)