can i get image file width and height from uri in android?

前端 未结 10 2124
深忆病人
深忆病人 2020-12-08 01:58

i can getting the image width through MediaStore.Images.Media normally

but i need to getting the image width and height from image which selected from d

10条回答
  •  孤城傲影
    2020-12-08 02:48

    This set of utilities to work with the Size abstraction in Android.

    It contains an class SizeFromImage.java You can use it like this:

    ISize size = new SizeFromImage(imgFilePath);
    size.width();
    size.hight();
    

提交回复
热议问题