BitmapFactory.OptionsのinJustDecodeBoundsにtrueを指定してやる。
- outWidth(横幅)、outHeight(縦幅)、outMimeType(MIMEタイプ)などがとれる。
- http://developer.android.com/reference/android/graphics/BitmapFactory.Options.html
sample.java
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeResource(getResources(), resourceId, options);
Log.d(TAG, "width:" + options.outWidth + ", height:" + options.outHeight);