views:

67

answers:

3

Language doesn't matter, libraries either, I just need the fastest way specifying the window (title or handle).

Thanks in advance

Mike

+1  A: 

see man xwd

xwd takes screen snapshots

Joshua
Thanks for the info, import is part of imageMagick if I'm not mistaken but xwd is native to linux and also can take a screenshot of a different workspace if I did read correctly. I tought using xlib and/or opengl directly could have been faster but I didn't found any information about that.
Mike
Now I'm facing the problem where xwd doesn't work if the window is partially offscreen :(
Mike
@Mike I thought i saw someone write "Language doesn't matter, libraries either"...
Anders
@Anders, yes I did say that, I tought a native application could be faster but I guess I was wrong...
Mike
I'm looking at imlib2 atm...
Mike
I didn't think any program could get a snapshot of an offscreen (portion of a) window.
Joshua
Well.. if you look at Compiz, they can actually do that but they don't provide any documentation unfortunately :\
Mike
+3  A: 

Try:

import // man import for options

To take a snapshot of my pidgin client.

import -screen -window Kompislista foo.jpg // Kompislista is in swedish.

You can specify a lot of options, such as frame or window id.

Anders
+1. I use import ;D
yclian
A: 

take a look at gnome-screenshot also.

   gnome-screenshot --help

You can take the active window screen shot with -w option.

thegeek