LoginSignup
1
0

More than 3 years have passed since last update.

ImageMagick カレントディレクトリ内全画像の操作(Mac)

Last updated at Posted at 2019-08-11

HomeBrewでImageMagickをインストール

$ brew install imagemagick

インストールの確認

$ convert

画像の情報を表示する

$ magick identify rose.jpg

*結果

rose.jpg JPEG 70x46 70x46+0+0 8-bit sRGB 2.36KB 0.000u 0:00.000

Filename[frame #] image-format widthxheight page-widthxpage-height+x-offset+y-offset colorspace user-time elapsed-time

画像情報を一覧表示(カレントディレクトリ内の全画像)

$cd <該当ディレクトリのパス> *該当ディレクトリに移動
$ magick identify *

フォーマット変更した画像を追加
(image.jpgのフォーマットを変更したimage.pngを追加 )

$ magick image.jpg image.png 

カレントディレクトリ内の全画像のフォーマットを一覧表示

$ magick identify -format "%w %h\n" *

長編1000pxでリサイズ(カレントディレクトリ内の全画像)

$ mogrify -resize 1000x1000 *

長編1000pxより大きい場合にリサイズ(カレントディレクトリ内の全画像)

$ mogrify -resize 1200x1200\> *

参考:
https://imagemagick.org/script/identify.php
https://fukatsu.tech/install-imagemagick
https://photo-tea.com/p/17/imagemagick-resize-watermark/
https://toshio-web.com/linux-mint-photo-resize

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