Cropper - NoCropper
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
CropperView
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
.
How To Install
Maven
repositories {
maven {
url "http://dl.bintray.com/jayrambhia/maven"
}
}
JCenter
repositories {
jcenter()
}
Dependency
dependencies {
compile 'com.fenchtose.nocropper:nocropper:0.1.3'
}
CropperImageView
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.
Useful Methods:
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)
Styleables
grid_color
- Color of the gridgrid_thickness
- Thickness of grid linesgrid_opacity
- Opacity of grid linespadding_color
- Color of the image padding
Licenses and Release History
NoCropper binaries and source code can be used according to the Apache License, Version 2.0.