Drag a Screenshot Using ImageMagick

Tagged:  

I learned an interesting trick while working on the Fuji water article. We all know that if you want to take a screenshot in Linux, all you usually have to do is press the "printscreen" button. That, however, takes a screenshot of the entire screen, which you then have to trim down into a useful bit of picture.

The trick I learned to make this easy is to simply type:

import screenshot.png
That will turn your cursor into a little crosshair, which you can drag across a section of the screen.

If you want to do that after a delay, the trick is to use the sleep command like so:

sleep 10; import screenshot.png

I found this tip along with a lot of others on this blog. There are some other interesting techniques there as well.

I've also found ksnapshot to be useful, if you want the screenshot to go to your clipboard. It's not as cool as a command-line method, but what can you do?

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.
  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>.

More information about formatting options

By submitting this form, you accept the Mollom privacy policy.