comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: How 2 show animations.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: How 2 show animations. [message #79488 is a reply to message #79484] Fri, 02 March 2012 06:15 Go to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
DavePoreh writes:

> I have 52 images (in .png) format and i would like to make it like
> animation in IDL. can anyone help me.

If you have IDL 8, the IDLffVideoWrite object produces
animations in mpg4 and avi format that don't look so
bad. You can specify which Codec you want to use to
build the animation, and so on. Quite a few features.

Here is a very simple example that makes an AVI movie of all
the PNG files in the current directory. Presumably, you
have named them in a sensible way. :-)

;--------------------------------------------------------
PRO Movie_Example

Compile_Opt idl2

; Open the video recorder.
video_file = 'movie_example.avi'
video = IDLffVideoWrite(video_file, Format='avi')

; Configure the video output for the PNG files you
; plan to add.
framerate = 5
xsize = 750
ysize = 600
stream = video.AddVideoStream(xsize, ysize, framerate)

; Get the files.
files = File_Search('*.png', COUNT=fileCnt)
FOR j=0,fileCnt-1 DO BEGIN

; Read the PNG file.
image = Read_PNG(files[j])

; Save the image in the video stream
void = video.Put(stream, image)

ENDFOR

; Clean things up.
video.Cleanup

END
;--------------------------------------------------------


Cheers,

David



--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Getting Help in On-Line Communities
Next Topic: saving a RAW data

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Fri Oct 10 14:14:51 PDT 2025

Total time taken to generate the page: 1.43869 seconds