/[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 1194 by jongui, Thu Jun 14 05:53:49 2007 UTC revision 1201 by jongui, Thu Jun 21 04:42:56 2007 UTC
# Line 31  m1 = Map(scene = s, data_collector = dc1 Line 31  m1 = Map(scene = s, data_collector = dc1
31  cam1 = Camera(scene = s, viewport = Viewport.SOUTH_WEST)  cam1 = Camera(scene = s, viewport = Viewport.SOUTH_WEST)
32    
33  # Create a movie.  # Create a movie.
34  mov = Movie()  mov = Movie("config_temp")
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.1194  
changed lines
  Added in v.1201

  ViewVC Help
Powered by ViewVC 1.1.26