从资源文件中获取Bitmap:
【1】先获取Resource,然后可以通过资源ID获取Drawable
Drawable d = r.getDrawable(R.drawable.xxx));
InputStream is = r.openRawResource(R.drawable.xxx);
BitmapDrawable bd = new BitmapDrawable(is)); bitmap = bd.getBitmap();
bitmap = BitmapFactory.decodeStream(is));
原文:http://www.cnblogs.com/LiuSiyuan/p/3750348.html