Skip to content

Instantly share code, notes, and snippets.

@asus4
Created October 28, 2015 09:19
Show Gist options
  • Save asus4/d3a1f3889c7ca0e69efc to your computer and use it in GitHub Desktop.
Save asus4/d3a1f3889c7ca0e69efc to your computer and use it in GitHub Desktop.
Export *.psd to *.png using ImageMagic.
#!/bin/sh
mkdir out
for f in *.psd
do
echo ${f/psd/png}
# 1.trim
# 2.resize with in (512 x 512)
# 3 convert to png
convert $f[0] -trim +repage -resize '512x512' out/${f/psd/png}
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment