shell script to convert .GIF to .gray

requires ImageMagick
This commit is contained in:
Charles Mangin 2019-01-05 13:11:30 -05:00 committed by GitHub
parent 0eb98b1ea9
commit b528b262a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

10
greenscale.sh Normal file
View File

@ -0,0 +1,10 @@
#!/bin/bash
convert animation.gif frame%05d.gif
convert frame*.gif -compress none -scale 56x100% -scale 40x48\! -colorspace Gray -colors 16 -depth 8 -auto-level -evaluate divide 17 %d.gray
for file in *.gray
do
cat "$file" | python -u ../greenscale.py >> output.bin
done