Created
August 11, 2011 14:04
-
-
Save rincewind/1139727 to your computer and use it in GitHub Desktop.
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
#!/bin/bash | |
set -e | |
set -u | |
start=1 | |
if [ $# -eq 2 ] | |
then | |
start=$2 | |
fi | |
numlayer=`convert "$1" -format "%[scenes]" info: | head -n 1` | |
echo "${numlayer} layers" | |
for i in `seq $start $numlayer` | |
do | |
label=`convert "$1"[$i] -verbose info: | grep "label:" | cut -d: -f 2 ` | |
echo "[${i}/${numlayer}] label: ${label}" | |
convert "$1"[$i] "${label:1}-$i-$1.png" | |
done | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment