Skip to content

Instantly share code, notes, and snippets.

@mzlogin mzlogin/
Last active Jul 18, 2016

What would you like to do?
Get image size without load image to memory in Android.
BitmapFactory.Options opt = new BitmapFactory.Options();
opt.inJustDecodeBounds = true;
BitmapFactory.decodeResource(context.getResources(), R.drawable.demo_img, opt);
int width = opt.outWidth;
int height = opt.outHeight;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.