A Video Editor layer with simple, easy support for image editing using Text, Filters, Emoji like stories.
- Apply Filter Effect on image using MediaEffect
- Adding/Editing Text with option to change its Color with Custom Fonts.
- Adding Emoji with Custom Emoji Fonts.
- Change the volume of added Songs
- Pinch to Scale and Rotate views.
- Deleting Views
- Saving Video after editing.
We can apply inbuild filter to the source images using
mPhotoEditor.setFilterEffect(PhotoFilter.BRIGHTNESS);
We can also apply custom effect using Custom.Builder
We can add the text with inputText and colorCode like this
mPhotoEditor.addText(inputText, colorCode);
In order to edit the text we need the view, which we will receive in our PhotoEditor callback. This callback will trigger when we Long Press the added text
mPhotoEditor.setOnPhotoEditorListener(new OnPhotoEditorListener() {
@Override
public void onEditTextChangeListener(View rootView, String text, int colorCode) {
}
});
We can add the Emoji by PhotoEditor.getEmojis(getActivity());
which will return a list of emojis unicode. You can also long press on the added emoji to edit them.
We need to provide a Bitmap to add our Images mPhotoEditor.addImage(bitmap);
For deleting a Text/Emoji/Image we can click on the view to toggle the view highlighter box which will have a close icon. So, by clicking on the icon we can delete the view.
We need to provide a file with callback method when edited image is saved
mPhotoEditor.saveAsFile(filePath, new PhotoEditor.OnSaveListener() {
@Override
public void onSuccess(@NonNull String imagePath) {
Log.e("PhotoEditor","Image Saved Successfully");
}
@Override
public void onFailure(@NonNull Exception exception) {
Log.e("PhotoEditor","Failed to save Image");
}
});