#! /bin/sh -f
# Program yukips2gif
# --- converting gtool format data into GMT grd data
# By Yukiko Hirabayashi 2000,9,12
###############################################
COMNAME=`basename $0`

if [ $# -lt 2 ] ; then
   echo $COMNAME - convert /*.ps/ File to /*.gif/ with cutting edge
   echo usage : $COMNAME ps-file-name  gif-file-name '<rot>'
   echo option rot, rothr, hr
   exit
fi
#========================================================================
#convert -density 144x144 -geometry 50% -crop 480x720+100+50 $1 $2
if [ "$3" = "rot" ]; then
  convert -trim -density 144 -geometry 50% -rotate 90 $1 $2
elif [ "$3" = "rothr" ]; then
  convert -trim -density 288 -geometry 50% -rotate 90 $1 $2
elif [ "$3" = "hr" ]; then
  convert -trim -density 288 -geometry 50% $1 $2
else
  convert -trim -density 144 -geometry 50% $1 $2
fi
#========================================================================

###########################

exit 0
