Skip to content

Instantly share code, notes, and snippets.

@dpaluy
Created May 18, 2019 08:36
Show Gist options
  • Select an option

  • Save dpaluy/cc017d2ede1598e35d13f8204f1290f2 to your computer and use it in GitHub Desktop.

Select an option

Save dpaluy/cc017d2ede1598e35d13f8204f1290f2 to your computer and use it in GitHub Desktop.
Split TIFF files into pages using GraphicMagic
#!/bin/bash
FILES="input/*.TIF"
SPLIT="_"
for filename in $FILES; do
fbname=$(basename "$filename" | cut -d. -f1)
gm convert "$filename" +adjoin "results/$fbname$SPLIT%01d.jpg"
done
@dpaluy
Copy link
Author

dpaluy commented Jul 14, 2019

This script uses GraphicsMagick

Install: brew install graphicsmagick

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment