Re: animated gif's with IDL [message #11320 is a reply to message #11318] |
Tue, 24 March 1998 00:00  |
bowman
Messages: 121 Registered: September 1991
|
Senior Member |
|
|
In article <351830D2.41C6@io.harvard.edu>, Martin Schultz
<mgs@io.harvard.edu> wrote:
> I am trying to create a little gif animation using IDL (for those who
> don't know it: a powerful data analysis package). IDL has a WRITE_GIF
> routine and it allows storage of multiple gif images in one file. So far
> so good. Only, if I want to watch my animation with a web browser
> (Netscape), it runs through exactly once, then stops. Can anyone tell me
> how to change a gif file so that it loops ad infinitum (or even better:
> does anyone have an IDL routine that does this) ?
For those with a Mac available, I offer the following solution. There
must be similar products (to GraphicConverter) for the PC and Unix.
The following creates a set of raw image files called frame.0000,
frame.0001, etc.
FOR frame = 0L, nframes-1L DO BEGIN
;Draw your graphic here
image =TVRD() ;Read image from window
OPENW, ounit, STRING(frame,FORMAT="(I4.4)"),$;Open new file for writing
/GET_LUN
image = ROTATE(image,7) ;Flip image right side up
WRITEU, ounit, image ;Write image to file
FREE_LUN, ounit ;Release out unit and file
ENDFOR
Move the files to a Macintosh. Use GraphicConverter (highly-rated
shareware) to convert the images to a QuickTime movie. Import the figures
as filetype RAW. QuickTime lets you set the frame rate, the compressor,
the image quality, etc. You can display it with a web browser, and you
get a slider, so you can go backwards, forwards, jump to any frame, etc.
Regards, Ken
|
|
|