sreelallalu
11/6/2017 - 12:36 PM

ImageView_2_BitMap

ImageView_2_BitMap

Bitmap bitmap;
if (img1.getDrawable() instanceof BitmapDrawable) {
bitmap = ((BitmapDrawable) img1.getDrawable()).getBitmap();
} else {
Drawable d = img1.getDrawable();
bitmap = Bitmap.createBitmap(d.getIntrinsicWidth(), d.getIntrinsicHeight(), Bitmap.Config.ARGB_8888);
Canvas canvas = new Canvas(bitmap);
d.draw(canvas);
}
// Bitmap placePinBM = createDrawableFromView(MainActivity.this, img1);
img2.setImageBitmap(bitmap);