It is an android image editing SDK with simple, easy support for image manipulation.
Github Project
You can check the whole project here.
Features
- Adding Images.
- Adding Stickers.
- Adding Text with option to change its Color.
- Drawing on image with option to change its Color, its Size and Erasing.
- Scaling and Rotating views.
- Deleting views.
- Saving photo after editing.
- Undo after adding views.
- Transforms
- Flip
- Rotate
- Resize
Benefits
- Hassle free coding
- Increase efficiency
- Easy image editing
Installation
For Gradle
Step 1 : Add it in your root build.gradle at the end of repositories
1
2
3
4
5
6
allprojects {
repositories {
...
maven { url 'https://jitpack.io' }
}
}
Step 2 : Add the dependency
1
2
3
dependencies {
implementation "com.github.eventtus:photo-editor-android:v1.0"
}
For Maven
Step 1 : Add it in your root build.gradle at the end of repositories
1
2
3
4
5
6
<repositories>
<repository>
<id>jitpack.io</id>
<url>https://jitpack.io</url>
</repository>
</repositories>
Step 2 : Add the dependency
1
2
3
4
5
<dependency>
<groupId>com.github.eventtus</groupId>
<artifactId>photo-editor-android</artifactId>
<version>v1.0</version>
</dependency>
User Documentation :
- First of all you have to get instance of PhotoEditorSDK to initialize it and start calling the desired functions.
1 2 3 4 5 6 7 8 9 10 11
photoEditorSDK = new PhotoEditorSDK.PhotoEditorSDKBuilder(PhotoEditorActivity.this) .parentView(parentImageRelativeLayout) //add parent image view .childView(photoEditImageView) //add the desired image view .deleteView(deleteRelativeLayout) //add the deleted view that will appear during the movement of the views .brushDrawingView(brushDrawingView) // add the brush drawing view that is responsible for drawing on the image view .buildPhotoEditorSDK(); // build photo editor sdk
- To add Text on the image:
1
photoEditorSDK.addText(text, colorCodeTextView);
- To add Image or Stickers:
1
photoEditorSDK.addImage(image);
- To add Emoji:
1
photoEditorSDK.addEmoji(emojiName, emojiFont);
- To Draw on the image:
1 2
photoEditorSDK.setBrushDrawingMode(brushDrawingMode); // brushDrawingMode is false by default, true if you want to draw on the image view
- To change the Color and Size of the drawing view and the Size and the Color of the Eraser view:
1 2 3 4 5
photoEditorSDK.setBrushSize(size); photoEditorSDK.setBrushColor(colorCode); photoEditorSDK.brushEraser(); photoEditorSDK.setBrushEraserSize(brushEraserSize); photoEditorSDK.setBrushEraserColor(color);
- To Save the image after editing:
1
photoEditorSDK.saveImage(folderName, imageName);
- To Undo the added Views (Image or Text):
1
photoEditorSDK.viewUndo();
- To Clear All the added Views (Image or Text):
1
photoEditorSDK.clearAllViews();
- To Clear All the added Drawing Views:
1
photoEditorSDK.clearBrushAllViews();
- To listen on Added Views, Edit the added Text Views, Added and Removed Views and Start and Stop Moving Views. You can implement:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24
photoEditorSDK.setOnPhotoEditorSDKListener( new OnPhotoEditorSDKListener() { @Override public void onEditTextChangeListener(String text, int colorCode) { } @Override public void onAddViewListener(ViewType viewType, int numberOfAddedViews) { } @Override public void onRemoveViewListener(int numberOfAddedViews) { } @Override public void onStartViewChangeListener(ViewType viewType) { } @Override public void onStopViewChangeListener(ViewType viewType) { } } );