我需要获取位图的宽度和高度,但使用它会导致内存不足异常:
Resources res=getResources();
Bitmap mBitmap = BitmapFactory.decodeResource(res, R.drawable.pic);
BitmapDrawable bDrawable = new BitmapDrawable(res, mBitmap);
//get the size of the image and the screen
int bitmapWidth = bDrawable.getIntrinsicWidth();
int bitmapHeight = bDrawable.getIntrinsicHeight();
我在Get bitmap width and height without loading to memory问题中阅读了解决方案,但是这里的 inputStream 是什么?