Editing Asset Content
Editing Asset Content
Editing Asset Content Make a request to modify and save a photo or video asset.
Overview
For each photo asset, Photos keeps a previous and a current version of its image data, as well as a PHAdjustmentData object that describes the last edit the user made to each asset’s content. Your app uses this information to support resumable editing.
When you begin editing an asset, Photos first asks whether your app can interpret the adjustment data from the most recent edit. If so, Photos provides the previous version of the asset as input for your editing session. After you read the adjustment data and reconstruct the edit it describes, your app might let the user alter or revert the last edit or make further changes. For example, adjustment data may describe filters applied to a photo. Your app reapplies those filters and allows the user to change filter parameters, add new filters, or remove filters.
If your app doesn’t support an asset’s adjustment data, Photos provides the current version of the asset as input to your editing session. The current version contains the rendered output of all past edits, so your app can further edit the asset but cannot alter or revert most recent edit.
To support continuity of editing between different apps and extensions, Photos keeps the current and previous versions of each asset, along with a PHAdjustmentData object that describes the last edit. If your app supports the adjustment data from a previous edit, you can allow the user to revert or alter the edit.
Note For video assets, Photos doesn’t store a previous version. If your app cannot read a video asset’s adjustment data, you must work with the current version of the video. Future versions won’t be able to make use of your app’s adjustment data.