Last active
January 27, 2022 22:40
-
-
Save dnmellen/ab8755a52263edc48d0746e88269eab1 to your computer and use it in GitHub Desktop.
Hipstergram: Bash script to convert images to a square aspect ratio with white background (Uses ImageMagick)
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 | |
for file in `ls -1`; do | |
echo $file; | |
convert -background white -gravity center $file -resize 1080x1080 -extent 1080x1080 i-$file | |
convert $file -crop 2x1@ i-$file | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment