Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!elroy.jpl.nasa.gov!ames!sgi!shinobu!odin!krypton!gavin From: gavin@krypton.asd.sgi.com (Gavin A. Bell) Newsgroups: comp.sys.sgi Subject: Re: login icons: summary Message-ID: <1990Oct11.180838.24211@odin.corp.sgi.com> Date: 11 Oct 90 18:08:38 GMT References: <90Oct11.102621edt.57674@ugw.utcs.utoronto.ca> Sender: news@odin.corp.sgi.com (Net News) Organization: Silicon Graphics, Inc. Mountain View, CA Lines: 43 I got tired of trying to figure out what arguments to give to izoom to get the images under 100 x 100 pixels, so I wrote this little shell script which allows you to specify the size of the new image in pixels. --- Save the following stuff in a file called 'zoom', --- then chmod +x zoom #!/bin/sh # Script to take an image and zoom it to a specific size # Arguments: # zoom img newimg xsize ysize if test $# -ne 4 ; then echo "Usage: " $0 " image new_image xsize ysize" exit 1 fi img=$1 imgnew=$2 newx=$3 newy=$4 xsize=`istat $img | grep -v xsize | cut -c1-5` ysize=`istat $img | grep -v xsize | cut -c7-12` xscale=`bc -l << EOF $newx/$xsize EOF ` yscale=`bc -l << EOF $newy/$ysize EOF ` echo "Executing command:" echo "\t" izoom $img $imgnew $xscale $yscale izoom $img $imgnew $xscale $yscale echo "Done." ------------END OF LINES TO BE SAVED -- --gavin (gavin@sgi.com, (415)335-1024)