Both sides previous revisionPrevious revisionNext revision | Previous revisionNext revisionBoth sides next revision |
howtos:window_managers:take_a_screenshot [2013/02/09 17:01 (UTC)] – [The Keyboard Method] hazel | howtos:window_managers:take_a_screenshot [2013/02/09 17:07 (UTC)] – [The ''xwd'' Command] hazel |
---|
<code>xwd | convert - path/to/screenshot.ext</code> | <code>xwd | convert - path/to/screenshot.ext</code> |
| |
You will be provided with a crosshair, just select the window you want to capture. You can change the type of the output file only by changing the extension, for example ''screenshot.png'', ''screenshot.jpg'', ''screenshot.gif'', etc. The ''-'' switch is to indicate ''convert'' that you are using the standart input. | You will be provided with a crosshair, just select the window you want to capture. You can change the type of the output file only by changing the extension, for example ''screenshot.png'', ''screenshot.jpg'', ''screenshot.gif'', etc. The ''-'' switch is to indicate to ''convert'' that it should translate from standard input rather than a file. |
<note tip>Remember to bring the window you want to grab on top of the others. Every window which covers it will be replaced by black pixels (or black boxes) in the final capture. Which by the way can be an useful way to hide some parts of the output! For example if you take a screenshot of an xterm full of commands with some of your personal info displayed (passwords, IP addresses, ...), or a screenshot of a browser and you want to hide some tabs. Just place some windows over the one you want to capture.</note> | <note tip>Remember to raise the window you want to grab above the others. Otherwise every window which covers it will be replaced by black pixels (or black boxes) in the final capture. Which by the way can be an useful way to hide some parts of the output! For example if you take a screenshot of an xterm full of commands with some of your personal info displayed (passwords, IP addresses, ...), or a screenshot of a browser and you want to hide some tabs. Just place some windows over the one you want to capture.</note> |
| |
If you want to capture a window WITH its overlayered windows, so that the capture does not display a black box but instead the overlaying window(s) content (for example, an application menu or an xterm window over a browser to capture both at the same time, etc), use the ''-screen'' switch: | If you want to capture a window WITH its overlayered windows, so that the capture does not display a black box but instead the overlaying window(s) content (for example, an application menu or an xterm window over a browser to capture both at the same time, etc), use the ''-screen'' switch: |
Add the ''-root'' switch to get: | Add the ''-root'' switch to get: |
<code>''xwd -root | convert - path/to/screenshot.ext''</code> | <code>''xwd -root | convert - path/to/screenshot.ext''</code> |
The ''-root'' indicates you want to grab the "main" X window, so all what you can see currently displayed on screen (//root// is the name of the main X window). As it's capturing the whole screen, you wont need to select a window.\\ | The ''-root'' indicates you want to grab the "main" X window, so all what you can see currently displayed on screen (//root// is the name of the main X window). As it's capturing the whole screen, you won't need to select a window.\\ |
| |
==== Imagemagick's ''import'' Command ==== | ==== Imagemagick's ''import'' Command ==== |