public static Point getSize ( Resources res , int resId ) { BitmapFactory . Options options = new BitmapFactory . Options ( ) ; options . inJustDecodeBounds = true ; BitmapFactory . decodeResource ( res , resId , options ) ; int width = options . outWidth ; int height = options . outHeight ; return new Point ( width , height ) ; }
Get width and height of the bitmap specified with the resource id .