Here you can find the source of getVideoThumbnail(String videoPath, int width, int height, int kind)
public static Bitmap getVideoThumbnail(String videoPath, int width, int height, int kind)
//package com.java2s; import android.graphics.Bitmap; import android.media.ThumbnailUtils; public class Main { public static Bitmap getVideoThumbnail(String videoPath, int width, int height, int kind) { Bitmap bitmap = null;//from ww w . j a v a 2s . co m bitmap = ThumbnailUtils.createVideoThumbnail(videoPath, kind); System.out.println("w" + bitmap.getWidth()); System.out.println("h" + bitmap.getHeight()); bitmap = ThumbnailUtils.extractThumbnail(bitmap, width, height, ThumbnailUtils.OPTIONS_RECYCLE_INPUT); return bitmap; } }