1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

MacOSで.HEICフォーマットの画像を.jpgに一括変換するコマンド

Last updated at Posted at 2021-04-19

とあるフォルダの中の百以上ある.HEICフォーマットの写真画像を、プレビューを使って一括変換しようとしたらフリーズしてしまったので、コマンドラインで変換した備忘録。

まず、そのフォルダに移動(cd)しておいてから、

for i in `ls *.HEIC | sed -e 's/HEIC//g'`; do echo sips --setProperty format jpeg ${i}HEIC --out ${i}jpg; done

上のコマンドをたたいて対象ファイルが正しいかなどを確認する。
(コマンド長いのでスクロールして最後までご覧ください)
それから、do echoの部分をdo evalに変更すると、表示されたコマンドがそのまま実行される。

同じフォルダの中に、拡張子が.jpgに変更されたファイルが大量にできます。
こうしてみると、たしかにHEICの圧縮率はjpgの2倍くらいにはなっている感じですね。

情報元:
https://www.labohyt.net/blog/apple/post-1730/

1
2
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
1
2

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?