LoginSignup
4
4

More than 5 years have passed since last update.

JPEG ファイルをファイルの最大サイズを指定してリサイズする

Last updated at Posted at 2013-11-18

カレントディレクトリ以下の 1MB より大きい JPEG ファイルを探して、画像の幅を 1600px に変換し、1MB 以内にリサイズする。
JPEG ファイルの拡張子が jpg と決まっているなら、find と mogrify を使って下のようなコマンドで実現できる。

find . -type f -size +1M -name "*.jpg" -print0 | xargs -0 mogrify -geometry 1600 -define jpeg:extent=1mb
4
4
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
4