#! /bin/csh -f
# Last edited on 2008-02-04 18:26:06 by stolfi

set usage = "$0 FILE.tiff ..."

# Lists the sizes (width and height) of the given TIFF files, one per line.

set path = ( /usr/local/bin /usr/bin /usr/ucb )
set pbmbin = "${STOLFIHOME}/pkg/netpbm-1mar1994-1/PUB/${PLATFORM}/bin"
set gnubin = "/usr/bin"
set getdims = "${STOLFIHOME}/bin/get-pnm-dimensions"

if ( $#argv == 0 ) then
  echo "usage: ${usage}"; exit 1
endif

foreach f ( $* )
  set fxy = ( `${pbmbin}/tifftopnm ${f} | ${getdims}` )
  printf "%5d %5d %s\n" $fxy[1] $fxy[2] $f 
end