Created
January 23, 2021 21:56
-
-
Save astromme/a77969a1e91bafce4b444eae7366de7a to your computer and use it in GitHub Desktop.
Creates many copies of images in the correct format so that the mac screensaver shows them for a longer duration.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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_for_screensaver.sh ../*.{JPG,jpg} | |
# each copy shows for about 5 seconds, so 120 copies is about 6 minutes per slide | |
copies=120 | |
num=1 | |
for i in $@ | |
do | |
command="convert $i -geometry 2560x1440^ -gravity center -crop 2560x1440+0+0 $num.jpg" | |
echo $command | |
eval "$command" | |
for j in $(seq 1 $copies) | |
do | |
command="ln $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