如果你又大量的图片要处理ImageMagick是一个不错的选择
完全命令操作,命令调用可以通过shell 脚本,也可以通过java命令调用
具体java 命令调用参考
public static List<String> list = new ArrayList<>(); public static List<String> getList() { return list; } public static void CommandDo() throws IOException, InterruptedException { Runtime runtime = Runtime.getRuntime(); Iterator iterator = list.iterator(); while (iterator.hasNext()) { String string = (String) iterator.next(); System.out.println(string); Process ps = runtime.exec(string); ps.waitFor(); } /** * 清空命令 */ list.clear(); }和传入的命令一样
具体教程参考
http://www.imagemagick.org/script/convert.php
参数的说明与使用
http://www.imagemagick.org/script/convert.php
批量处理
http://blog.sina.com.cn/s/blog_68f88be10102vohm.html