/[escript]/trunk/doc/examples/pyvisi/movie.py
ViewVC logotype

Diff of /trunk/doc/examples/pyvisi/movie.py

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1196 by jongui, Thu Jun 14 05:53:49 2007 UTC revision 1197 by jongui, Mon Jun 18 02:08:34 2007 UTC
# Line 32  cam1 = Camera(scene = s, viewport = View Line 32  cam1 = Camera(scene = s, viewport = View
32    
33  # Create a movie.  # Create a movie.
34  mov = Movie()  mov = Movie()
35    #lst = []
36    
37  # Read in one file one after another and render the object.  # Read in one file one after another and render the object.
38  for i in range(938, 949):  for i in range(938, 949):
# Line 41  for i in range(938, 949): Line 42  for i in range(938, 949):
42      s.render(image_name = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, \      s.render(image_name = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, \
43              IMAGE_NAME + "%06d.jpg") % i)              IMAGE_NAME + "%06d.jpg") % i)
44    
45  # Generate the movie from the rendered images.      #lst.append(IMAGE_NAME + "%06d.jpg" % i)
46  mov.makeMovie(input_directory = PYVISI_EXAMPLE_IMAGES_PATH,  
47    # Images (first and last inclusive) from which the movie is to be generated.
48    mov.imageRange(input_directory = PYVISI_EXAMPLE_IMAGES_PATH,
49          first_image = IMAGE_NAME + "000938.jpg",          first_image = IMAGE_NAME + "000938.jpg",
50          last_image = IMAGE_NAME + "000948.jpg",          last_image = IMAGE_NAME + "000948.jpg")
51          movie = os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, "movie.mpg"))  
52    # Alternatively, a list of images can be specified.
53    #mov.imageList(input_directory = PYVISI_EXAMPLE_IMAGES_PATH, image_list = lst)
54    
55    # Generate the movie.
56    mov.makeMovie(os.path.join(PYVISI_EXAMPLE_IMAGES_PATH, "movie.mpg"))
57    

Legend:
Removed from v.1196  
changed lines
  Added in v.1197

  ViewVC Help
Powered by ViewVC 1.1.26