IDL Access Tools

Introduction  |   Getting Started  |  Tutorial:  1  2  3  4  5  |   Extended Help

** DRAFT ** DRAFT ** ** DRAFT ** DRAFT ** ** DRAFT **



Tutorial:

5. Playing a portion of a GIF animation

This section of the tutorial will explain how to play a portion of a GIF animation, such as those found in the 1.25 km and the 5 km AVHRR visualizations of the P-Cube CD-ROM (TOVS Path-P users may obtain this CD-ROM from NSIDC User Services). You will learn how to use:


PLAY_GIF - Playing a portion of a GIF animation

The GIF animations found in the 1.25 km and 5 km AVHRR visualizations pages on the P-Cube CD-ROM contain a wealth of details. However, when viewed with a conventional browser, much of the detail can be hard to see since most browsers don't allow you to vary the playback speed or play only a portion of an animation. You can overcome these limitations by using PLAY_GIF.

NOTE: Because PLAY_GIF uses the /MULTIPLE keyword to the READ_GIF procedure which wasn't introduced until IDL 5, you must be running IDL 5 or higher to use PLAY_GIF.

Try running PLAY_GIF to play the 5 km AVHRR northern hemisphere "background" temperature animation:

IDL> cd,'[CDROM]/AVHRR5/IMAGERY'
IDL> play_gif,'nor_14_bcktmp_animation.gif'

By default, PLAY_GIF plays the first 50 frames of an animation file, i.e. it starts at frame 0 and plays through frame 49. After the animation portion finishes loading, try playing with the buttons and sliders in the XINTERANIMATE widget. You can single step the animation by first pressing the "stop" button (||) at the top, and then selecting the Animation Frame slider by placing the mouse cursor over it and clicking once. Then with the Animation Frame slider selected, pressing the right and left arrow keys will single step forward and backward, respectively, and pressing the Home and End and keys will take you to the first and last frames, respectively, in the animation portion. When you're done playing with the buttons and sliders, press the End Animation button to close the widget.

Now try playing 35 frames of the 1.25 km AVHRR Point Barrow albedo animation starting with frame number 100:

IDL> cd,'[CDROM]/AVHRR1/IMAGERY'
IDL> play_gif,'bar_14_albd_animation.gif',first=100,count=35,/noremap

It's necessary to include the /NOREMAP keyword with 1.25 km AVHRR GIF animations in order to see the same colors for coastlines and grid lines as you see using the browser. You need to limit the value of COUNT depending on the dimensions of the animation and the amount of memory in your computer. Here we are loading 35 frames of a 560 x 352 animation which requires 35 x 560 x 352 = almost 7 MB of memory.

Please refer to the Extended Help Documentation for details on the other keywords to PLAY_GIF.


End of tutorial. Go back to beginning.