summaryrefslogtreecommitdiff
path: root/src/app/bad-apple-msp430fr-sharp96/convert
diff options
context:
space:
mode:
authorBirte Kristina Friesel <derf@finalrewind.org>2024-02-10 21:46:45 +0100
committerBirte Kristina Friesel <derf@finalrewind.org>2024-02-10 21:46:45 +0100
commitcdf3c02cb8b7a557e8aeeda5b7e13b3139a41b0e (patch)
tree19f8666708075c2a9c40f054b1c13cadcca8d20f /src/app/bad-apple-msp430fr-sharp96/convert
parentef9d29ee0ecef0da260388300f354de48b1032c1 (diff)
rename sharp96-bad-apple to bad-apple-msp430fr-sharp96
Diffstat (limited to 'src/app/bad-apple-msp430fr-sharp96/convert')
-rwxr-xr-xsrc/app/bad-apple-msp430fr-sharp96/convert16
1 files changed, 16 insertions, 0 deletions
diff --git a/src/app/bad-apple-msp430fr-sharp96/convert b/src/app/bad-apple-msp430fr-sharp96/convert
new file mode 100755
index 0000000..d357faa
--- /dev/null
+++ b/src/app/bad-apple-msp430fr-sharp96/convert
@@ -0,0 +1,16 @@
+#!/bin/sh
+
+# ./convert.sh <file> -r <frame rate> [additional ffmpeg args]
+
+set -eu
+
+mkdir -p tmp
+
+ffmpeg -i "$@" tmp/frame%4d.png
+
+parallel mogrify -resize 96x96 -threshold 50% -- tmp/*.png
+
+echo "const unsigned char frame_rate = $3;" > frames.cc
+./frames-to-cc tmp/*.png >> frames.cc
+
+rm -rf tmp