-
-
Save dellsystem/906125 to your computer and use it in GitHub Desktop.
converting tifs to pyramidal tiffs
This file contains 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
#!/usr/bin/env bash | |
# A bash script for converting all the files in a directory to pyramidal tiff | |
# Pass the directory the images are stored in as an argument | |
# But it will put the images in the current directory ... to be fixed | |
if [ $# -lt 3 ]; then | |
echo 'Usage: tile <directory> <extension> <desired_prefix>' | |
else | |
echo 'Looking for all files in directory: $1/' | |
FILES=$1/*.$2 | |
i=1 | |
for file in $FILES | |
do | |
echo "Processing $file file ..." | |
convert="vips im_vips2tiff $file $3_$i.tif:none,tile:256x256,pyramid" | |
echo $convert | |
echo `$convert` | |
i=$(( $i + 1 )) # ...bash | |
# break | |
done | |
fi |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment