- 追加された行はこの色です。
- 削除された行はこの色です。
#author("2023-05-06T19:25:31+09:00","","")
#topicpath
///////////////////////////////////////////////////////////////////////////////
* 目次 [#b3b24650]
#contents();
///////////////////////////////////////////////////////////////////////////////
* display [#j2058fc4]
///////////////////////////////////////////////////////////////////////////////
* tips [#c8cfb155]
** 画像ファイルとサムネイルから画像一覧のHTMLページを作る [#ae74cc54]
//=============================================================================
** exif 情報を元に自動で本来の向きに回転させる [#ldd523b9]
$ convert ${in_file} -auto-orient ${out_file}
- in_file と out_file には同じファイル名を指定して大丈夫のようだ(安全のためには別にしておいたほうがいいだろう)
- マルチスレッドで大量のファイルを変更する場合、xargs を使うと早い
$ find . -type f -name '*.jpg' | xargs -P ${thread_num} -I@ convert @ -auto-orient @
-- 一番最後の "@" は出力ファイルの指定。このままだと同じファイルに上書きすることになる。上書きしたくない場合は "../out/@" などとして出力先を変えたり、元ファイル名に文字列を追加しておく
//=============================================================================
** 画像の回転 [#w20d9a18]
$ convert <in-file> -rotate <degree-to-rotate> <out-file>
|~option |~description |~remark |
|<degree-to-rotate> |回転度数を degree で指定する。+は時計回り方向、-は半時計回り方向となる | |