Image
Import the following dependency in your file, here you will use these function.
import { launchImageEdit,getFilePath } from 'truvideo-react-image-sdk';
Get File Path
getFilePath
is function which provide file path of the image or video with name which will be platform specific
getFilePath(fileName: string)
.then((result) => {
console.log('result', result);
})
.catch((error) => {
console.log('error', error);
});
Launch Image Edit
launchImageEdit function launches the editing screen for image
try {
// generate path to feed in image edit by providing file name
const resultPath = await getFilePath(`${Date.now()}-editImage.png`);
// launchImageEdit will launch image screen and save the file at the result path
const result = await launchImageEdit(selectedItemPath, resultPath);
// handle the result
console.log('Image edited successfully:', result);
} catch (error) {
console.log('Error editing image:', error);
}
Last updated
Was this helpful?