Image Editor
TruvideoSdkImageEditorPreset
TruvideoSdkImageEditorPresetThis class is part of the Truvideo SDK and is used to configure the image editor with specific settings before presenting it to the user.
There is 2 ways to configure this class:
Method 1:
imageURL: AURLpointing to the input image that will be edited.outputURL: AURLwhere the edited image will be saved.
let configuration = TruvideoSdkImageEditorPreset(
imageURL: imageUrl, // URL of the image to be edited
outputURL: outputUrl // URL where the edited image will be saved
)Method 2:
inputImage: image objectoutputURL: AURLwhere the edited image will be saved.
let configuration2 = TruvideoSdkImageEditorPreset(
image: inputImage, // UIImage to be edited
outputURL: outputUrl // URL where the edited image will be saved
)presentTruvideoSdkImageEditorView(preset:onComplete:)
presentTruvideoSdkImageEditorView(preset:onComplete:)This method is used to present the Truvideo image editor with a given preset configuration.
Parameters:
preset: An instance ofTruvideoSdkImageEditorPresetcontaining the configuration for the editor.onComplete: A closure that is called when the image editor finishes. It returns aresultobject that contains:editedImage: The editedUIImage. If editing fails, a default emptyUIImageis returned.editedImageURL: TheURLwhere the edited image is saved. This property is available on iOS 16.0 and later.
Example Usage :
Last updated
Was this helpful?