drawable to bitmap code example
Example 1: get bitmap from drawable
Bitmap icon = BitmapFactory.decodeResource(context.getResources(),
R.drawable.icon_resource);
Example 2: convert bitmap to drawable android
Drawable d = new BitmapDrawable(getResources(), bitmap);