批量压缩图片

By admin, 15 六月, 2017

 convert -quality 50命令可以把一幅图片的大小降到原来的1/4左右。下面命令可以批量压缩目录里大于100K的图片。

find . -size +100k|xargs -I '{}' convert -quality 50 '{}' '{}'

评论

Restricted HTML

  • 允许的HTML标签:<a href hreflang> <em> <strong> <cite> <blockquote cite> <code> <ul type> <ol start type> <li> <dl> <dt> <dd> <h2 id> <h3 id> <h4 id> <h5 id> <h6 id> <img src>
  • 自动断行和分段。
  • 网页和电子邮件地址自动转换为链接。
验证码
This question is for testing whether or not you are a human visitor and to prevent automated spam submissions.
请输入"Drupal10"