I'm able to get the height and width of an image. But is there a method to retrieve the size (in bytes or kb or mb) for an image stored in the phone?
相关问题
- Views base64 encoded blob in HTML with PHP
- How can I create this custom Bottom Navigation on
- How to get the background from multiple images by
- Bottom Navigation View gets Shrink Down
- How to make that the snackbar action button be sho
相关文章
- android开发 怎么把图片放入drawable的文件夹下
- android上如何获取/storage/emulated/下的文件列表
- androidStudio有个箭头不认识
- SQLite不能创建表
- Windows - Android SDK manager not listing any plat
- Animate Recycler View grid when number of columns
- Why is the app closing suddenly without showing an
- Android OverlayItem.setMarker(): Change the marker
You just need to create a new
File
object such as...Thank you for your answers. This is how I finally resolved it:
Appreciate your time and answers :)
This returns the true size that is match in computers when you see file details with right click.
Assuming your talking about a bitmap (and NOT an ImageView), there is a method Bitmap.getByteCount().