Skip to content

Instantly share code, notes, and snippets.

@astromme
Last active August 5, 2019 00:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save astromme/96e6093ac94b2aae4c14db1ec7645872 to your computer and use it in GitHub Desktop.
Save astromme/96e6093ac94b2aae4c14db1ec7645872 to your computer and use it in GitHub Desktop.
#!/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