Image-Cropper Library “CropMe”

Image for post
Image for post

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"
}
Image for post
Image for post

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

Written by

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

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store