Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add imagemagick script for making bullet sprites
- Loading branch information
Showing
3 changed files
with
27 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
Derived from Bullet Collection 2 (M484 Games) | ||
by Master484 (http://m484games.ucoz.com/) | ||
http://opengameart.org/content/bullet-collection-2-m484-games | ||
http://creativecommons.org/publicdomain/zero/1.0/ |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
#!/bin/sh | ||
# | ||
# Create a bullet spritesheet by rotating a source image | ||
# | ||
if [ "$#" -ne 1 ]; then | ||
echo "Usage: make_bullet_spritesheet.sh infile" | ||
exit 1 | ||
fi | ||
command='convert $1 -background none -virtual-pixel background' | ||
|
||
for i in `seq 45 45 315`; do | ||
command="$command \\( -clone 0 -filter Point -distort SRT $i \\)" | ||
done | ||
|
||
BASENAME=`basename "$1" | cut -d. -f1` | ||
DIMENSIONS=`identify -format "%wx%h" $1` | ||
OUTFILE=${BASENAME}_${DIMENSIONS}.png | ||
|
||
command="$command +append -channel A -threshold 60% $OUTFILE" | ||
|
||
eval $command | ||
|
||
chmod 644 $OUTFILE |