private void getDropboxIMGSize(Uri uri){
BitmapFactory.Options options = new BitmapFactory.Options();
options.inJustDecodeBounds = true;
BitmapFactory.decodeFile(new File(uri.getPath()).getAbsolutePath(), options);
int imageHeight = options.outHeight;
int imageWidth = options.outWidth;
}
no there is no way. You have to create a Bitmap object. if you use the inJustDecodeBounds
flag the bitmap would not be loaded in memory. In fact BitmapFactory.decodeFile
will return null. In my example uri
is the phisical path to the image
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…