public Drawable bitmap2drawable(Bitmap bitmap){
BitmapDrawable bitmapDrawable = new BitmapDrawable(bitmap);
return bitmapDrawable;
}
public Bitmap drawable2bitmap(Drawable drawable){
BitmapDrawable bitmapDrawable = (BitmapDrawable) drawable;
Bitmap bitmap = bitmapDrawable.getBitmap();
return bitmap;
}
转载于:https://www.cnblogs.com/olvo/archive/2012/06/05/2536380.html