使用Thumbnails对一个文件夹下的所有图片进行压缩处理

public static void compressPic(){
        try {
            Thumbnails.of(new File("/home/y/my_temp/ydbg-xy-pic").listFiles())
                    .size(94, 100)
                    .outputFormat("jpg")
                    .toFiles(Rename.PREFIX_DOT_THUMBNAIL);
        } catch (IOException ex) {
            Logger.getLogger(Test.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
原文地址:https://www.cnblogs.com/yshyee/p/4586527.html