Skip to content

Instantly share code, notes, and snippets.

Keybase proof

I hereby claim:

  • I am brian-i on github.
  • I am bdi (https://keybase.io/bdi) on keybase.
  • I have a public key ASCN54k1FvCzjPHlmqz7vHsBx7LOMMP9-r_1HornVAHDeQo

To claim this, I am signing this object:

@brian-i
brian-i / processor
Created July 29, 2016 14:02
Batch Image Straightening and Corrections
#!/bin/bash
# Uses http://www.imagemagick.org
# Astoria LIC
find . -name "*.tif" | while read file; do
convert "$file" -background '#fdfdfd' -rotate 5 rotated_"${file:2}"
convert rotated_"${file:2}" -bordercolor '#fdfdfd' -border 40x100 rotbor_"${file:2}"
sh multicrop2 -f 10 -u 2 rotbor_"${file:2}" pro_"${file:2}"
@brian-i
brian-i / gist:ff0e6bba4934fbb3d25f93db01aba5ff
Last active July 29, 2016 03:39 — forked from bzg/gist:2fc136b176690ee7f1e7
Use imagemagick to rotate pictures in a directory and add borders
#!/bin/bash
# Uses http://www.imagemagick.org
find . -name "*.tif" | while read file; do
convert "$file" -background '#fdfdfd' -rotate 10 rotated_"${file:2}"
convert rotated_"${file:2}" -bordercolor '#fdfdfd' -border 40x100 rotbor_"${file:2}"
done