Write script to extract frames from a spritesheet
This commit is contained in:
parent
0aab456433
commit
8397666cb2
5
scripts/frames.sh
Executable file
5
scripts/frames.sh
Executable file
@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
width=$(identify -ping -format '%w\n' "$1")
|
||||
height=$(identify -ping -format '%h\n' "$1")
|
||||
framewidth=$(expr "$width" / "$2")
|
||||
magick "$1" -crop "${framewidth}x$height" "$3"
|
Loading…
x
Reference in New Issue
Block a user