How to get Full width, height and file size of image in an ImageView

Standard

After lots of googling, testing and… it’s all yours:

Bitmap bitmap = ((BitmapDrawable)image.getDrawable()).getBitmap();
int width = bmp.getWidth();
int height = bmp.getHeight();
long size = getSizeInBytes(bitmap);

Leave a Reply

Your email address will not be published. Required fields are marked *