Write script to extract frames from a spritesheet

This commit is contained in:
Camden Dixie O'Brien 2024-12-31 20:06:10 +00:00
parent 0aab456433
commit 8397666cb2

5
scripts/frames.sh Executable file
View 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"