Screen capture on Linux

P

Paolo Pantaleo

Hi,

I need to capture a screen snapshot in Linux. PIL has a module
IageGrab, but in the free version it only works under Windows. Is
there any package to capture the screen on Linux?

Thnx
PAolo
 
S

sjdevnull

Paolo said:
Hi,

I need to capture a screen snapshot in Linux. PIL has a module
IageGrab, but in the free version it only works under Windows. Is
there any package to capture the screen on Linux?

xwd comes with the X server. man xwd

Most useful is "xwd -root" or similar. You may want "sleep 5; xwd
-root" to give you some time to set things up as needed, or map it to a
window manager keybinding.
 
T

Theerasak Photha

xwd comes with the X server. man xwd

Most useful is "xwd -root" or similar. You may want "sleep 5; xwd
-root" to give you some time to set things up as needed, or map it to a
window manager keybinding.

The problem with that is that xwd format is a non-standard format, and
*uncompressed* on top of that. If he wants to distribute the image to
friends, or whatever, he'll have to convert it to something like png
anyway. If he's using Linux, he probably doesn't need to use xwd
anyway and might as well save himself the effort (and HD space) now.

-- Theerasak
 
P

Paolo Pantaleo

Thnx everybody for the help,

actually I need somethin slightly different. I found about some
external process that can capture the screen, but since I need to
captyre the screen up to 4-5 times a second, I don't want to fork a
new process every time, so I was looking for some library...[This
method works good on Windows]

If needed, I was thinking to write a C module too. I never did it
before, but I am a not so bad C programmer... any suggestion? What
code can I read and eventually reuse? Would the xwd be useful?

Anyway doesn't it exist a Python binding for let's say X APIs ?
[I know about nothing about X programing]
 
F

Fredrik Lundh

Paolo said:
If needed, I was thinking to write a C module too. I never did it
before, but I am a not so bad C programmer... any suggestion? What
code can I read and eventually reuse? Would the xwd be useful?

Anyway doesn't it exist a Python binding for let's say X APIs ?

http://sourceforge.net/projects/python-xlib

(that's an X protocol client, not a binding to X's standard C library).

</F>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top