[Thread Prev][Thread Next][Index]

Re: window size

Hi John,
Ferret uses the size of the output device to determine the default size of the window.  Saving the image as a gif image just saves the screen image.   You can get any size gif you want, using SET WINDOW/SIXE and SET WINDOW/ASPECT, and a tool such as XV to
check what size you're getting.  For example, to make a gif that is 800 pixels wide and 600 high,

yes? SET WINDOW/ASPECT=0.75      ! set the aspect ratio, 600/800
yes? SHADE/i=1:10/j=1:15 i+j                 ! a sample plot
yes? FRAME/FILE=testsize.gif

Now go look at testsize.gif in your viewing tool.   With my setup, the size of this gif was 889x665.  Your result might be somewhat different depending your display device, or if you start ferret with "ferret -gif".  Now we'll use the /SIZE qualifier too.
SET WINDOW/SIZE=frac resizes the area of the window by frac. We want to keep the same aspect ratio, and make the plot smaller by the fraction (600*800) / (889*665)

yes? LET frac = (600*800)/(889*665)
yes? SET WINDOW/ASPECT=0.75/size=`frac`
yes? SHADE/i=1:10/j=1:15 i+j
yes? FRAME/FILE=final.gif

And final.gif will is of the desired size.

Ansley Manke

John C Cartwright wrote:

> Hello All,
> I'm trying to use ferret to create a series of GIF images and am a
> little confused about how to go about getting a specific size result
> image out.
> For instance, if I need a 600x800 output GIF, how do I go about
> calculating the set window/size, set window/aspect values?
> Thanks!
> -- john
> =====================================================
> John Cartwright
> Associate Scientist
> Geospatial Data Services Group
> CIRES, National Geophysical Data Center/NOAA
> (303) 497-6284
> John.C.Cartwright@ngdc.noaa.gov
> =====================================================

Ansley Manke  Pacific Marine Environmental Laboratory  Seattle WA  (206)526-6246

[Thread Prev][Thread Next][Index]

Dept of Commerce / NOAA / OAR / PMEL / TMAP

Contact Us | Privacy Policy | Disclaimer | Accessibility Statement