Last active
December 12, 2018 17:40
-
-
Save baobao/7853e23079a5701406bf758000554417 to your computer and use it in GitHub Desktop.
フォルダ内のjpgをexport/同名.pngに書き出す
This file contains 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
#required imagemagick | |
# フォルダ内のjpgをexport/同名.pngに書き出す | |
extension='jpg' | |
mkdir -p export | |
for fileNameWithEx in *.$extension ; do | |
# 拡張子を取る | |
fileName=${fileNameWithEx/.*/} | |
# jpg => png | |
convert $fileNameWithEx export/${fileName}.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment