#!/bin/bash ## Convert TIFF images into PNG images and create an aggregated PDF ## Written August 20, 2010 ## 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 exit 1