If you don't mind adding a new Library to your project just to do image loading for you, you can easily add Glide to crop your local drawables or images from the web.
In your build.gradle (module app)
compile 'com.github.bumptech.glide:glide:3.6.0'
You can crop the image with this below:
final ImageView myImage = (ImageView) findViewById(R.id.myimageview);
final int myWidth = 210;
final int myHeight = 80;
Glide.with(getApplicationContext())
.load(R.drawable.example_drawable) // you can add any drawable or url of an image here
.asBitmap()
.into(new SimpleTarget<Bitmap>(myWidth, myHeight) {
@Override
public void onResourceReady(Bitmap bitmap, GlideAnimation anim) {
// Do something with bitmap here.
Bitmap bm = Bitmap.createBitmap(bitmap, 0, 0, myWidth, myHeight);
myImage.setImageBitmap(bm);
}
});