You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
|
|
|
#!/bin/bash
|
|
|
|
## Convert TIFF images into PNG images and create an aggregated PDF
|
|
|
|
## Written August 20, 2010
|
|
|
|
## Edited March 21, 2015
|
|
|
|
## Taha Ahmed
|
|
|
|
|
|
|
|
|
|
|
|
echo "Converting *.tif to png"
|
|
|
|
mogrify -format png *.tif
|
|
|
|
echo "Creating pdf file with all *.tif images"
|
|
|
|
# ${PWD##*/} extracts the name of the parent directory from the current path
|
|
|
|
convert *.tif ${PWD##*/}.pdf
|
|
|
|
|
|
|
|
|
|
|
|
## make low-res png files
|
|
|
|
for f in *.png
|
|
|
|
do
|
|
|
|
echo "Creating low-res version of $f"
|
|
|
|
convert $f -resize 25% ${f%.*}-low.png
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
## dump TIF tags to file
|
|
|
|
for f in *.tif
|
|
|
|
do
|
|
|
|
echo "Printing TIFF tags of $f"
|
|
|
|
tiffinfo $f > ${f%.*}.txt
|
|
|
|
done
|
|
|
|
|
|
|
|
|
|
|
|
exit 1
|