Image-Cropper Library “CropMe”

Taku Semba
Sep 16, 2017 · 2 min read

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! ;)

Taku Semba

Written by

Android Engineer at AbemaTV Github: https://github.com/takusemba

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade