Skip to content

Instantly share code, notes, and snippets.

@PoisonousJohn
Last active February 1, 2019 22:06
Show Gist options
  • Save PoisonousJohn/43970a2205daf93ea8e3bcd017534d63 to your computer and use it in GitHub Desktop.
Save PoisonousJohn/43970a2205daf93ea8e3bcd017534d63 to your computer and use it in GitHub Desktop.
ImageMagick crop image to square adding stripes on the sides, same names
#!/bin/bash
mkdir -p out
convert *.JPG -background white -resize "1500x1500" -gravity Center -extent 1500x1500 -rotate 90 -set filename:f '%t' out/'%[filename:f].png'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment