Skip to content

Instantly share code, notes, and snippets.

@codespore
Created January 30, 2016 00:57
Show Gist options
  • Select an option

  • Save codespore/4c46985f55d87ee3cb08 to your computer and use it in GitHub Desktop.

Select an option

Save codespore/4c46985f55d87ee3cb08 to your computer and use it in GitHub Desktop.
#! /usr/bin/env bash
cd '../source/'
for PHOTO in *.jpg
do
filename="$(echo $PHOTO | cut -d'.' -f 1 | sed 's/ /_/g')"
filename=`basename $filename`
convert "$PHOTO" -resize "600x600^" -gravity center -crop 600x600+0+0 +repage "../processed/$filename.jpg"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment