Created
November 20, 2010 13:31
-
-
Save jamesu/707829 to your computer and use it in GitHub Desktop.
composeit.sh
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 | |
# Composes animation frames in subdirectories into a single consolidated image | |
# e.g. | |
# composeit robot (Will combine robot{ANIMS}{DIRECTIONS}/*.png into a single robot.png) | |
THEBASE=$1 | |
DIRECTIONS="NE NW SE SW" | |
ANIMS="Walk Idle" | |
DFILES="" | |
FRAME_SIZE="64x64" | |
for sanim in $ANIMS; do | |
for sdir in $DIRECTIONS; do | |
DFILES="$THEBASE$sanim$sdir/*.png $DFILES" | |
done | |
done | |
echo "COMPOSING $DFILES" | |
montage -background "transparent" -depth 24 -type TrueColorMatte $DFILES -geometry $FRAME_SIZE -matte -transparent "transparent" -type TrueColorMatte -depth 24 $THEBASE.png |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment