//会缩放图片
BitmapDrawable drawable = (BitmapDrawable)getResources().getDrawable(R.drawable.logo);
Log.d("XX", drawable.getBitmap().getHeight() + " " + drawable.getBitmap().getWidth());
//会缩放图片
Bitmap bitmap1 = BitmapFactory.decodeResource(getResources(), R.drawable.logo);
Log.d("XX", bitmap1.getHeight() + " " + bitmap1.getWidth());
//不会缩放图片
Bitmap bitmap2 = BitmapFactory.decodeStream(getResources().openRawResource(R.drawable.logo));
Log.d("XX", bitmap2.getHeight() + " " + bitmap2.getWidth());
//不会缩放图片
InputStream is = getResources().openRawResource(R.drawable.logo);
BitmapDrawable bmpDraw = new BitmapDrawable(is);
Bitmap bmp = bmpDraw.getBitmap();
Log.d("XX", bmp.getHeight() + " " + bmp.getWidth());