Platforms to show: All Mac Windows Linux Cross-Platform
PHContentEditingInputMBS class
Type | Topic | Plugin | Version | macOS | Windows | Linux | iOS | Targets |
class | Photos | MBS Mac64bit Plugin | 20.2 | ✅ Yes | ❌ No | ❌ No | ✅ Yes | Desktop & iOS |
To edit an asset’s photo or video content:
1. Fetch a PHAsset object that represents the photo or video to be edited.
2. Call the asset’s requestContentEditingInputWithOptions method to retrieve a PHContentEditingInputMBS object.
3. Apply your edits to the asset. To allow a user to continue working with the edit later (for example, to adjust the parameters of a photo filter), create a PHAdjustmentDataMBS object describing the changes.
4. Initialize a PHContentEditingOutputMBS object. For photo- or video-only assets, use the editing output’s properties to provide edited asset data. For Live Photo assets, create a PHLivePhotoEditingContextMBS object to edit the Live Photo content.
5. Use a photo library change block to commit the edit. In the block, create a PHAssetChangeRequestMBS object and set its contentEditingOutput property to the editing output that you created. For more details, see PHPhotoLibraryMBS.
You can also edit assets from photo editing extensions. In this case, instead of working with a PHAsset object, you implement methods in the PHContentEditingControllerMBS protocol. Photos provides a PHContentEditingInputMBS object when your extension begins editing. When editing is complete, Photos requests a PHContentEditingOutputMBS object that contains the edited asset content.
- 14 properties
- property adjustmentData as PHAdjustmentDataMBS
- property audiovisualAsset as Variant
- property creationDate as Date
- property creationDateTime as DateTime
- property displaySizeImage as NSImageMBS
- property fullSizeImageOrientation as Integer
- property fullSizeImageURL as String
- property Handle as Integer
- property livePhoto as PHLivePhotoMBS
- property location as Variant
- property mediaSubtypes as Integer
- property mediaType as Integer
- property playbackStyle as Integer
- property uniformTypeIdentifier as String
- method Constructor
- shared method available as boolean
- 6 constants
Asset Playback Styles
Constant | Value | Description |
---|---|---|
PlaybackStyleImage | 1 |
The asset should be displayed as a still image. |
PlaybackStyleImageAnimated | 2 |
The asset should be displayed as an animated image. |
PlaybackStyleLivePhoto | 3 |
The asset should be displayed as a Live Photo. |
PlaybackStyleUnsupported | 0 |
The asset has an unsupported or undefined media playback type. |
PlaybackStyleVideo | 4 |
The asset should be displayed as a video. |
PlaybackStyleVideoLooping | 5 |
The asset should be displayed as a looping video. |
This class has no sub classes.
Some methods using this class:
- PHContentEditingOutputMBS.Constructor(contentEditingInput as PHContentEditingInputMBS)
- PHLivePhotoEditingContextMBS.Constructor(livePhotoInput as PHContentEditingInputMBS)
The items on this page are in the following plugins: MBS Mac64bit Plugin.
PHCollectionMBS - PHContentEditingInputRequestOptionsMBS