Get thumbnail Uri/path of the image stored in sd card + android

前端 未结 8 673
自闭症患者
自闭症患者 2020-11-28 04:46

SDK version - 1.6

I am using following intent to open android\'s default gallery:

Intent intent = new Intent();
                inte         


        
8条回答
  •  春和景丽
    2020-11-28 05:06

    It could be a alternative ways as other had already mentioned in their answer but Easy way i found to get thumbnail is using ExifInterface

    ExifInterface exif = new ExifInterface(pictureFile.getPath());
    byte[] imageData=exif.getThumbnail();
    Bitmap  thumbnail= BitmapFactory.decodeByteArray(imageData,0,imageData.length);
    

提交回复
热议问题