1. resource转bitmap
//方法1
//资源 beauty01 转化为 Bitmap
Bitmap bitmap = BitmapFactory.decodeResource(getResources(), R.mipmap.beauty01);
//方法2 利用BitmapDrawable转成Bitmap
Bitmap bitmap = ((BitmapDrawable)getResources().getDrawable(R.mipmap.beauty01)).getBitmap();
2. Bitmap转drawable
//同样利用BitmapDrawable if(bitmap instance BitmapDrawable)
Drawable bitmapDrawable = new BitmapDrawable(bitmap);
//或
Drawable bitmapDrawable = new BitmapDrawable(getResources(),bitmap);