Skip to content

Macのターミナルでつかえる画像処理コマンド sips

www.maclife.com で書かれたことがきっかけで,「大量の画像を一括してリサイズするコマンド」sips が話題になった.man で調べてみると,この sips は他にもいろいろできるようである.少しまとめてみた.

まず, maclife で用いられたコマンドを紹介しよう.

sips -Z 640 *.jpg

-Z オプションは縦横比の固定を表し,640は幅と高さのうち大きいほうの値の最大値を640ピクセルにすることを表し,最後の *.jpg はカレント・ディレクトリにある拡張子 jpg であるすべてのファイルを表している.

もとのファイルを変更したくない場合には,新しいファイルを生成するフォルダを指定する.フォルダは先に作成しておかなくてはならない.

sips -Z 640 *.jpg –out newFolder

ファイルにEXIFデータがある場合にはそれを確認することができる.以下は設定されているすべてのEXIFデータを確認する方法である.

sips -g all *.jpg

一部のEXIFデータは消すこともできる.以下のコマンドでは撮影日時データを消去できる.

sips -d creation *.jpg

複数の撮影データを消したい場合には(面倒だけど)-dオプションを並べる.撮影日時,モデル,メーカー名を削除する.

sips -d creation -d model -d make *jpg

値を再設定することもできるようだが,その必要性がわからないので省略.他にもできそうなことはあるけど,これぐらいできればどうにかなると思われる.

Duality of polyhedrons

多面体の双対の概念をわかってもらおうと思ってアニメーションを作りました.良かったら見てください. 「ひとつ足りない」と思ったら,それがなぜか考えてくれるとうれしいです.

I made animations in order to help understanding the idea of duality of polyhedrons.


今回は日本語で

これからは,たまに日本語で書きます.実はもうひとつ日本語ブログがあったりしております.そこに書いていた内容のうち,もしかしたら有益になるかもしれない情報については,今後はこちらに書いていこうと思いました.よろしくお願いいたします.

Two animations

I considered some properties  of the van der Pol equation d^2 x/dt^2 +mu (x^2-1)+x=0. During the consideration, I made some animations for understanding its limit cycle solutions.  I opened two animations which I made in youtube.  One is its shape in real space and the other is the one in phase space.


Workshop on 03/10/2012

We, my co-workers and I, held a workshop on 03/10/2012.  The report of the workshop in Japanese can be read on the page linked below.

http://jidoucenter.blog119.fc2.com/blog-entry-109.html

my works on youtube

I posted my three video works to youtube.com.  Please access the page written below.

http://www.youtube.com/user/takashiyoshinorw

New Animation

I made an animation which shows how a planer graph is made from a polyhedron using buckyball.

bucky02

Farewell Steve!

I would like to thank Mr. Jobs for his creativity and passion.

Earthquakes and Disasters

As already known, earthquakes and disasters attacked about a half part of Japan.  I and my family are alive but so many people, mainly north-east part of Japan, were dead and much people alive there are suffer from lack of water, food, wear, and so on now.   The current situation is terrible and I have no word to describe it correctly.

The disaster also affects my activities.  Some events relating to my research and some my lectures were suspended or canceled.

How do I live well in such a situation?  I have no answer now but I think that I have to spend my life time meaningfully as possible as I can.

 

Recovery

I caught cold and had toothache form the beginning of this month.  Fortunately, I have good condition now.