Created
May 2, 2016 06:39
-
-
Save sanukin39/05c130dd9ea804f8eb49ed6b913bdbea to your computer and use it in GitHub Desktop.
imagemagickを使って一括でpngの透過除去を行うスクリプト(変換された画像はサブフォルダに出力される)
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
#!bin/sh | |
# 保存用のサブフォルダを作成 | |
mkdir nonalpha | |
# 同フォルダ内にあるpngを取得 | |
for file in `\find . -maxdepth 1 -type f -name '*.png'`; do | |
echo convert ${file} | |
convert ${file} \( +clone -alpha opaque -fill SkyBlue -colorize 100% \) +swap -geometry +0+0 -compose Over -composite -alpha off nonalpha/${file} | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment