aboutsummaryrefslogtreecommitdiff
path: root/experiments/conv/crop
diff options
context:
space:
mode:
Diffstat (limited to 'experiments/conv/crop')
-rwxr-xr-xexperiments/conv/crop8
1 files changed, 8 insertions, 0 deletions
diff --git a/experiments/conv/crop b/experiments/conv/crop
new file mode 100755
index 0000000..072bb75
--- /dev/null
+++ b/experiments/conv/crop
@@ -0,0 +1,8 @@
+#!/bin/sh
+input_file="$1"
+output_file="${input_file%.*}-crop.png"
+magick "$input_file" \
+ -resize 256x80^ \
+ -gravity center -extent 256x80 \
+ "$output_file"
+