//第一种获取bitmap的方式:通过BitmapFactory
InputStream inStream = getResources().openRawResource(R.drawable.qinshi);
Bitmap bmp = BitmapFactory.decodeStream(inStream);
//第二种获取bitmap的方式
InputStream inStream = getResources().openRawResource(R.drawable.qinshi);
BitmapDrawable draw = new BitmapDrawable(inStream);
Bitmap bmp = draw.getBitmap();
//第三种获取bitmap的方式
Bitmap bmp = ((BitmapDrawable)getResources().getDrawable(R.drawable.qinshi)).getBitmap();