常用的方法

1,drawable转bitmap

// 获取待处理的图像
方法1
BitmapDrawable tmpBitDra = (BitmapDrawable) getResources().getDrawable(R.drawable.ic_launcher);
Bitmap tmpBit = tmpBitDra.getBitmap();
方法2
final Bitmap bitmap=BitmapFactory.decodeResource(getResources(), R.drawable.XXX);
posted on 2015-10-06 11:12  心想快乐  阅读(102)  评论(0编辑  收藏  举报