Android 生成缩略图

    private static final String PATH = Environment.getExternalStoragePublicDirectory(Environment.DIRECTORY_PICTURES).toString() + "/Screenshots/";
    private final int WIDTH = 800;
    private final int HEIGHT = 500;
    private Bitmap thumbnail;
    private String imageName;

    // ...

    thumbnail = ThumbnailUtils.extractThumbnail(BitmapFactory.decodeFile(PATH + imageName), WIDTH, HEIGHT);

你可能感兴趣的:(Android 生成缩略图)