Unreal-Dreams / Video_Editor

This is a Video Editing layer in which you can pass video by intent. Now you can add text, emoji, drawings to the video and you can even draw with the brush on the video itself.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

VideoEditor

A Video Editor layer with simple, easy support for image editing using Text, Filters, Emoji like stories.

Features

  • 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.

Filter Effect

We can apply inbuild filter to the source images using

mPhotoEditor.setFilterEffect(PhotoFilter.BRIGHTNESS);

GIF-210301_210700

We can also apply custom effect using Custom.Builder

Text

We can add the text with inputText and colorCode like this

mPhotoEditor.addText(inputText, colorCode);

GIF-210301_205915

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) {
               
           }
       });

Emoji

GIF-210301_204946

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.

Adding Images/Stickers

We need to provide a Bitmap to add our Images mPhotoEditor.addImage(bitmap);

Deleting

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.

Saving

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");
                 }
             });

GIF-210301_210037

About

This is a Video Editing layer in which you can pass video by intent. Now you can add text, emoji, drawings to the video and you can even draw with the brush on the video itself.

License:MIT License


Languages

Language:Java 100.0%