Page 1 of 1

How to capture screen

Posted: 2012-02-10T23:42:53-07:00
by foruforewer
I had searched for this in forum, but could not found exact line of code. Can you please tell how to capture screen/active screen with command line just like "Princ Screen" button

Re: How to capture screen

Posted: 2012-02-11T04:42:12-07:00
by foruforewer
Please help me in this...

Re: How to capture screen

Posted: 2012-02-12T06:46:24-07:00
by anthony
Do you mean like the "Print" button? For X windows use...

Code: Select all

convert x:root image.png
See IM Examples... X Windows Input
http://www.imagemagick.org/Usage/files/#x


I myself use a shell script to save the the current window into a file, then jiggle to the window to say 'I'm done'
It works well for me :-)

Re: How to capture screen

Posted: 2012-02-13T05:34:02-07:00
by foruforewer
While running that command, it shows

Code: Select all

Magick: unable to open X server `': No such file or directory @ error/xwindow.c/XImportImage/4871.

Re: How to capture screen

Posted: 2012-02-13T08:54:19-07:00
by Werty
x: is available for *nix only, if you are running windows then there is no such option, you'd have to go with one of the API's. (afaik, please correct if wrong)