A PIL.Image.grab()
takes about 0.5 seconds. That's just to get data from the screen to my app, without any processing on my part. FRAPS, on the other hand, can take screenshots up to 30 FPS. Is there any way for me to do the same from a Python program? If not, how about from a C program? (I could interface it w/ the Python program, potentially...)
views:
386answers:
1
+1
A:
If you want fast screenshots, you must use a lower level API, like DirectX or GTK. There are Python wrappers for those, like DirectPython and PyGTK. Some samples I've found follow:
Vinko Vrsalovic
2009-08-14 08:25:02
thanks for the start! so PIL takes 0.35 seconds (I timed it). The GTK sample in the 1st one is the same - 0.35. But the GTK without converting to PIL is 0.11, so that's a start...
Claudiu
2009-08-14 15:25:55
Check this out, it has most of the alternatives...http://stackoverflow.com/questions/69645/take-a-screenshot-via-a-python-script-linux
Vinko Vrsalovic
2009-08-14 21:01:23