开发者

How to create thumbnail for video,audio which is selected from SD Card?

开发者 https://www.devze.com 2023-04-05 07:24 出处:网络
I have got the uri of the video from SD card , by using this I want to create thumbail using this URI .

I have got the uri of the video from SD card , by using this I want to create thumbail using this URI .

How to ach开发者_JAVA百科ieve this? Any one help me to overcome this problem.


I think you can get the thumbnail images of your Images from sdcard try this link Thumbnail/image cache files?


To create a Bitmap for Video

'ThumbnailUtils.createVideoThumbnail(Videofilepath,MediaStore.Images.Thumbnails.MINI_KIND);'

To create a Bitmap for Image

'Bitmap ThumbImage = ThumbnailUtils.extractThumbnail(BitmapFactory.decodeFile(ImagePath), THUMBSIZE_HEIGHT, THUMBSIZE_WIDTH);'
0

精彩评论

暂无评论...
验证码 换一张
取 消