Path: utzoo!attcan!uunet!wuarchive!zaphod.mps.ohio-state.edu!mips!sgi!shinobu!odin!sgihub!dragon!bananapc.wpd.sgi.com!ciemo From: ciemo@bananapc.wpd.sgi.com (Dave Ciemiewicz) Newsgroups: comp.sys.sgi Subject: Re: login icons: summary Message-ID: <1990Oct11.234912.381@relay.wpd.sgi.com> Date: 11 Oct 90 23:49:12 GMT References: <90Oct11.102621edt.57674@ugw.utcs.utoronto.ca> <1990Oct11.180838.24211@odin.corp.sgi.com> Sender: news@relay.wpd.sgi.com ( CNews Account ) Reply-To: ciemo@bananapc.wpd.sgi.com (Dave Ciemiewicz) Organization: sgi Lines: 35 In article <1990Oct11.180838.24211@odin.corp.sgi.com>, gavin@krypton.asd.sgi.com (Gavin A. Bell) writes: |> 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. |> Like Gavin, I've written one too. A little simpler though and pushing the brunt of the work on nawk. |> --- 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" 1>&2 # send usage to stderr exit 2 fi img=$1 imgnew=$2 newx=$3 newy=$4 istat $img | nawk ' { if (NR == 2) { system("izoom '$img' '$imgnew' " 'newx' / $2 " " 'newy' / $2); } }' ~