Skip to content

Instantly share code, notes, and snippets.

@huming2207
Created December 17, 2017 05:54
Show Gist options
  • Save huming2207/0f4363282287c9d6ed049ca0c7432f9d to your computer and use it in GitHub Desktop.
Save huming2207/0f4363282287c9d6ed049ca0c7432f9d to your computer and use it in GitHub Desktop.
ImageMagick photo collage
#!/bin/bash
# By Jackson Ming Hu, 2017
# Users should rename and their photos to some paths with digit, e.g. ./0/foo.jpg, ./0/bar.jpg
for i in {2..10}
do
echo "Converting $i.jpg..."
convert ./$i/*.jpg -geometry +3+3 -border 2%x1% -bordercolor White -gravity Center -resize 50% -quality 85 -append $i.jpg
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment