Created
July 29, 2020 16:22
-
-
Save joswr1ght/d91eed54b3fdc9ea8011023672e9f7e9 to your computer and use it in GitHub Desktop.
Convert one or more TIFF files in the current directory to resized JPGs
This file contains hidden or 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 | |
if [ $? -eq 1 ] ; then | |
echo "Usage: $0 <save-dir> [long-edge-in-px]" | |
exit | |
fi | |
for image in *.tif; do | |
base=`echo $image | sed 's/.tif//'` | |
convert $image -resize "$2>" $1/$base-$1.jpg >>log 2>&1 | |
echo -n "." | |
done | |
echo |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment