Protocol

PHLivePhotoFrame

A container that provides image content for a single frame of a Live Photo in an editing context.

Declaration

@protocol PHLivePhotoFrame

Overview

You don’t create classes that implement this protocol. Instead, you provide a frameProcessor block when editing a Live Photo with the PHLivePhotoEditingContext class. When you process your edits for output or display, Photos calls your block repeatedly to process each frame of the Live Photo’s video and still photo content. On each call, Photos provides the frame’s image content and associated information in an object that adopts this protocol. In that block, you use that object’s image property to access the image to be edited, then perform your edits and return another CIImage object representing the result of processing the input image.

Topics

Editing the Frame Image

image

The image content of the frame to be processed.

Required.

Getting Information About the Frame

renderScale

The scale factor of the frame image relative to the Live Photo’s photo content.

Required.

time

The time offset, in seconds, of this frame relative to the start of the Live Photo.

Required.

type

The type of image content in this frame.

Required.

PHLivePhotoFrameType

Identifiers for the type of frame image to be processed. Used with the type property.

See Also

Editing an Asset

Editing Asset Content

Make a request to modify and save a photo or video asset.

PHContentEditingInput

A container that provides information about and access to the image, video, or Live Photo content of an asset to be edited.

PHContentEditingOutput

A container to which you provide the results of editing the photo, video, or Live Photo content of a Photos asset.

PHAdjustmentData

A description of the edits made to an asset's photo, video, or Live Photo content, which allows your app to reconstruct or revert the effects of prior editing sessions.

PHContentEditingInputRequestOptions

A set of options affecting the delivery of image or video data when you request to edit the content of a Photos asset.

PHLivePhotoEditingContext

An editing session for modifying the photo, video, and audio content of a Live Photo.

- canPerformEditOperation:

Returns whether the asset supports the specified editing operation.

PHAssetEditOperation

Values identifying possible actions an asset can support, used by the canPerformEditOperation: method.

- requestContentEditingInputWithOptions:completionHandler:

Requests asset information for beginning a content editing session.

- cancelContentEditingInputRequest:

Cancels a request for editing the asset’s content.

PHContentEditingInputRequestID

An identifier for an asset content editing session.

Editing Request Info Keys

Keys indicating the status of an asset content editing request, used in the completion handler of the requestContentEditingInputWithOptions:completionHandler: method.