This is a lightweight Image Cropper for Android which also supports no-crop feature.
Here's a short gif showing how it works.
And, here's a bit longer YouTube Video
It's a FrameLayout which contains a view for Grid and an imageview. This project supports only square cropping.
CropperView contains some basic methods like setImageBitmap()
, setMaxZoom()
, setMinZoom()
, etc which are
forwarded to CropperImageView
.
repositories {
maven {
url "http://dl.bintray.com/jayrambhia/maven"
}
}
repositories {
jcenter()
}
dependencies {
compile 'com.fenchtose.nocropper:nocropper:0.1.2'
}
It's a square ImageView which acts as the cropper. It tries to keep the image in the range of max and min zoom. It automatically adjusts the position of the image, if it's zoomed out.
setMaxZoom(float zoom)
set Maximum zoomsetMinZoom(float zoom)
set Minimum zoomsetImageBitmap(Bitmap bm)
set BitmapcropToCenter()
- Set Image in the center with square crop viewfitToCenter()
- Fit Image in the center (no cropping view)
grid_color
- Color of the gridgrid_thickness
- Thickness of grid linesgrid_opacity
- Opacity of grid linespadding_color
- Color of the image padding
NoCropper binaries and source code can be used according to the Apache License, Version 2.0.