Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
#!/bin/bash
# assuming convert.sh is in the folder you want the new images to be in,
# and the source images are one level up, then run with:
# ./convert.sh ../*.{JPG,jpg}
# each copy shows for about 5 seconds, so 120 copies is about 6 minutes per slide
copies=120
# my external monitor is 2560x1440. change this as needed for full-bleed images
resolution="2560x1440"
num=1
for i in $@
do
command="convert $i -geometry $resolution^ -gravity center -crop $resolution+0+0 $num.jpg"
echo $command
eval "$command"
for j in $(seq 1 $copies)
do
command="cp $num.jpg $num-$j.jpg"
echo $command
eval "$command"
done
((num++))
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment