• Stars
    star
    160
  • Rank 234,703 (Top 5 %)
  • Language
    Java
  • Created over 6 years ago
  • Updated over 6 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

A library module that tries to mimic whatsapp photo editor.

Whatsapp-Like-PhotoEditor

It is a library module that tries to mimic the whatsapp photoeditor. There are many things on which work needs to be done.

TODO

  • Fix cropping issue (needs to mimic whatsapp on this)
  • Remove ugly code
  • Convert code to kotlin
  • Publish on maven

demo demo demo demo demo

Usage

 ImageEditor.Builder(this, imagePath)
                .setStickerAssets("stickers")
                .disable(ImageEditor.EDITOR_TEXT) //to disable something
                .open()

Here setStickerAssets() methods takes folder name of stickers in the assets. Checkout sample if confused. You will get the result in onActivityResult

override fun onActivityResult(requestCode: Int, resultCode: Int, data: Intent?) {
    super.onActivityResult(requestCode, resultCode, data)
    when (requestCode) {
      ImageEditor.RC_IMAGE_EDITOR ->
        if (resultCode == Activity.RESULT_OK && data != null) {
          val imagePath: String = data.getStringExtra(ImageEditor.EXTRA_EDITED_PATH)
          edited_image.setImageBitmap(BitmapFactory.decodeFile(imagePath))
        }
    }
  }

Projects that helped

ImageEditor-Android

Android-Image-Cropper