GithubHelp home page GithubHelp logo

mathieumg / photo-editor-android Goto Github PK

View Code? Open in Web Editor NEW

This project forked from prscx/photo-editor-android

1.0 2.0 0.0 7.29 MB

Photo Editor SDK contains a lot of features like edit, scale, rotate and draw on images like Instagram stories.

License: MIT License

Java 100.00%

photo-editor-android's Introduction

PhotoEditorSDK

alt tag

It is an android image editing SDK with simple, easy support for image manipulation.


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

allprojects {
  repositories {
   ...
   maven { url 'https://jitpack.io' }
  }
}

Step 2 : Add the dependency

dependencies {
         compile 'com.github.eventtus:photo-editor-android:v1.0'
 }

For Maven :

Step 1 : Add it in your root build.gradle at the end of repositories

<repositories>
  <repository>
      <id>jitpack.io</id>
      <url>https://jitpack.io</url>
  </repository>
</repositories>

Step 2 : Add the dependency

<dependency>
     <groupId>com.github.eventtus</groupId>
     <artifactId>photo-editor-android</artifactId>
     <version>v1.0</version>
</dependency>

User Documentation :

  1. First of all you have to get instance of PhotoEditorSDK to initialize it and start calling the desired functions.
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
  1. To add Text on the image:
photoEditorSDK.addText(text, colorCodeTextView);
  1. To add Image or Stickers:
photoEditorSDK.addImage(image);
  1. To add Emoji:
photoEditorSDK.addEmoji(emojiName, emojiFont);
  1. To Draw on the image:
photoEditorSDK.setBrushDrawingMode(brushDrawingMode);
// brushDrawingMode is false by default, true if you want to draw on the image view
  1. To change the Color and Size of the drawing view and the Size and the Color of the Eraser view:
photoEditorSDK.setBrushSize(size);
photoEditorSDK.setBrushColor(colorCode);
photoEditorSDK.brushEraser();
photoEditorSDK.setBrushEraserSize(brushEraserSize);
photoEditorSDK.setBrushEraserColor(color);
  1. To Save the image after editing:
photoEditorSDK.saveImage(folderName, imageName);
  1. To Undo the added Views (Image or Text):
photoEditorSDK.viewUndo();
  1. To Clear All the added Views (Image or Text):
photoEditorSDK.clearAllViews();
  1. To Clear All the added Drawing Views:
photoEditorSDK.clearBrushAllViews();
  1. To listen on Added Views, Edit the added Text Views, Added and Removed Views and Start and Stop Moving Views. You can implement:
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) {
    
	}
});

Contributing

We welcome contributions from other developers to help us make the SDK even better. Before you contribute there are a number of things that you should know please see CONTRIBUTING.md for details.

Credits

PhotoEditorSDK was originally written by Ahmed Adel. Project is maintained and funded by

Eventtus

License

Copyright (c) 2017 Eventtus, PhotoEditorSDK is released under the MIT license.

photo-editor-android's People

Contributors

ahmedadeltito avatar prscx avatar rkhater avatar dozoisch avatar

Stargazers

Roman avatar

Watchers

James Cloos avatar Mathieu M-Gosselin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.