I have use the pesdk library to edit an image.
public static int GALLERY_RESULT = 2;
private void selectImgtoEdit() {
Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(path));
startActivityForResult(intent, GALLERY_RESULT);
}
protected void onActivityResult(int requestCode, int resultCode, Intent intent) {
super.onActivityResult(requestCode, resultCode, intent);
Uri selectedImage = intent.getData();
openEditor(selectedImage);
}
public void openEditor(Uri inputImage) {
SettingsList settingsList = createPesdkSettingsList();
// Set input image
settingsList.getSettingsModel(LoadSettings.class).setSource(inputImage);
settingsList.getSettingsModel(PhotoEditorSaveSettings.class).setOutputToGallery(Environment.DIRECTORY_DCIM);
new PhotoEditorBuilder(this).setSettingsList(settingsList).startActivityForResult(this, PESDK_RESULT);
}
I want to use that library with the absolute path of an image. How can I setting it ?
Do you have the absolute path of the image?
I suggest code like below, try again...
Use second getImageContentUri function in above answer.