Created
October 8, 2012 03:21
-
-
Save rafaelrinaldi/3850548 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