Image-Cropper Library “CropMe”

Taku Semba
2 min readSep 16, 2017

--

Hi, Im taku. Im a android developer. Recently, I created a library called “CropMe”. It’s a image cropping library and really smooth and easy.

Please, check this out, and give a STAR if you like it!

Usage

First, take it into your project like this.

dependencies {
compile 'com.github.takusemba:cropme:1.0.3'
compile "com.android.support:support-dynamic-animation:26.x.x"
}

Once you are done importing CropMe, you can use it inside your xml file

<com.takusemba.cropme.CropView
android:layout_width="match_parent"
android:layout_height="match_parent"
app:cropme_background_alpha="80%"
app:cropme_max_scale="3"
app:cropme_result_height="80%"
app:cropme_result_width="80%"
app:cropme_with_border="true" />

Then set your image

cropView.setUri(uri);
// or
cropView.setBitmap(bitmap);

Now, you can move around the views smoothly.

And crop the view!!

cropView.crop(new OnCropListener() {
@Override
public void onSuccess(Bitmap bitmap) {
// do something
}

@Override
public void onFailure() {

}
});

There is a sample code using crop view, so check it out to know more about CropMe.

Last

It would be really appreciated if you give me a STAR! ;)

--

--