-
-
Save quangson91/c58a183ea1406592f919b251490e99e0 to your computer and use it in GitHub Desktop.
Convert .psd files to .png files keeping the transparency.
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
#!/usr/bin/env bash | |
# | |
# Convert .psd files to .png files keeping the transparency. | |
# It uses `imagemagick` library. | |
# Usage: | |
# | |
# sh to_png.sh path/ | |
# | |
# Author: Rafael Rinaldi (rafaelrinaldi.com) | |
# Since: Oct 7, 2012 | |
# | |
for f in $1/*.psd; | |
do | |
base=${f%\.*}; | |
convert $f -background transparent -flatten $base.png | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment