The Image library has a screen capture capability that can be used to
capture an animation. It's a bit more kludgy than you may be envisioning --
but it works
the process is basically -- In your animation loop set the rate to 1
fps. before capturing the screen (so the display doesn't change during
capture), create an Image.core.grabscreen object, use the win32gui library
to find the handle, location and dimensions of the Vpython window, capture
the screen and then using the Image library, trim the captured bitmap to
only the Vpython window, save the bitmap to disk (as jpeg, bmp, etc), reset
rate to 30 to get an updated screen, and repeat.
The downside to this method is you can basically only capture
programmatically controlled displays -- the animation during capture
essentially slows to 1 fps -- so user interactions are really not captureable.
Bruce
At 08:16 PM 10/18/2004, you wrote:
> >>snip<<
>In any case, is there a capacity to render into a bitmap file set planned
>for Vpython? It seems to me I put together some code a long time ago
>to generate avi files from an OpenGL anim under win32, but just rendering
>to files and using something like ImageMagick would work on most platforms.
>
>Don
>
>
>--__--__--
>
>Message: 2
>Subject: Re: [Visualpython-users] Re: CamStudio: may prefer 2.0 over 2.1
>From: Jonathan Brandmeyer <jbr...@ea...>
>To: "Vis...@li..."
><Vis...@li...>
>Date: Mon, 18 Oct 2004 22:05:14 -0400
>
>On Mon, 2004-10-18 at 10:13, Donald_Gaffney wrote:
>
> > In any case, is there a capacity to render into a bitmap file set planned
> > for Vpython? It seems to me I put together some code a long time ago
> > to generate avi files from an OpenGL anim under win32, but just rendering
> > to files and using something like ImageMagick would work on most
> platforms.
> >
> > Don
>
>The idea has occurred to us. The main issue is that VPython's rendering
>is purely asynchronous with respect to the rate of animation. To make a
>movie correctly would require some kind of synchronous rendering mode
>(perhaps tied into rate() somehow), which is not planned at this time.
>
>-Jonathan
>
>
>
>
>--__--__--
>
>_______________________________________________
>Visualpython-users mailing list
>Vis...@li...
>https://lists.sourceforge.net/lists/listinfo/visualpython-users
>
>
>End of Visualpython-users Digest
Bruce Peterson
425 466 7344
|