getting Image ThumbNail in Android

前端 未结 4 1478
北荒
北荒 2020-12-28 08:52

I need Thumbnail of an image . I only know about the name of image which is stored in SD card . Can anyone help me.

4条回答
  •  独厮守ぢ
    2020-12-28 09:17

    Try this.

    final int THUMBSIZE = 64;
    
    Bitmap ThumbImage = ThumbnailUtils.extractThumbnail(BitmapFactory.decodeFile(imagePath), 
                        THUMBSIZE, THUMBSIZE);
    

    Refer this for more details.

提交回复
热议问题