Last active
November 30, 2016 06:34
-
-
Save haruaki64/51b65b2100feb38e363bc418d48da005 to your computer and use it in GitHub Desktop.
ImageMagickを使って、保存されている画像を正方形(500x500)にクロップ
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
# source: 元画像のパス | |
# dest: 変更された画像のパス | |
# sourceとdestは一緒でも大丈夫(上書きされる) | |
# たぶんsourceとdestで拡張子違っても大丈夫 | |
$ convert -resize 500x500^ -gravity center -crop 500x500+0+0 +repage source dest |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment