Jose adviced you tu use PIL but i think it depends on which OS you would li=
ke=20
to save an image from vpython screen.
I tried PIL under linux but it seems that it is working really better under=
=20
windows.
I'm using something not really satisfying but it is working ... i really th=
ink=20
there are some ways to improve it, because in that code, you must specify t=
he=20
position and size of the area you would like to grab. It is more a script t=
o=20
take screenshots.
import gtk, gc
width =3D 640
height =3D 480
x =3D 1
y =3D 1
filename =3D 'test.png'
screenshot =3D gtk.gdk.Pixbuf.get_from_drawable(
gtk.gdk.Pixbuf(gtk.gdk.COLORSPACE_RGB, True, 8, width, height),
gtk.gdk.get_default_root_window(),
gtk.gdk.colormap_get_system(),
x, y, 0, 0, width, height)
screenshot.save(filename, 'png')
del screenshot
gc.collect()
Le mercredi 28 f=E9vrier 2007 00:06, P H Borcherds a =E9crit=A0:
> Can one save vpython screen images within python, [i.e.not using prtscrn]?
>
> P H Borcherds phone +44 121 475 3029
> p.h...@bh...
>
> -------------------------------------------------------------------------
> Take Surveys. Earn Cash. Influence the Future of IT
> Join SourceForge.net's Techsay panel and you'll get the chance to share
> your opinions on IT & business topics through brief surveys-and earn cash
> http://www.techsay.com/default.php?page=3Djoin.php&p=3Dsourceforge&CID=3D=
DEVDEV
> _______________________________________________
> Visualpython-users mailing list
> Vis...@li...
> https://lists.sourceforge.net/lists/listinfo/visualpython-users
|