Created
March 23, 2016 07:48
-
-
Save fujidig/b3e3ea055de8505d05f5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # スキャンしたファイルを一括リサイズ&色補正 | |
| # カレントディレクトリにあるすべての.jpg(ただし名前に記号+がつかない)を編集し、 | |
| # 拡張子の前に+をつけて保存します | |
| width = 824 | |
| gamma = 0.4 | |
| Dir.glob("*.jpg").each do |fname| | |
| next if fname =~ /\+\.jpg$/ | |
| newname = fname.gsub(".jpg", "+.jpg") | |
| system "convert", fname, "-resize", width.to_s, "-level", "0%,100%,#{gamma}", newname | |
| end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment