xwpick
Compilation Instructions
The code can be found here: https://codeberg.org/x11cp/x11cp.git
git clone https://codeberg.org/x11cp/x11cp.git && cd x11cp/src/xwpick
Direct compilation
To compile this application, the following command should be used:
xmkmf -a && make
Toplevel Makefile
There is also a wrapper command in the top-level `Makefile` of the repository where this is can be run as:
make xwpick
About
xwpick
is a screenshot grabber for a specific window or the root window.
It’s similar to xwd
but written earlier than that.
What’s interesting about this program is that it inherently supports a number of output formats:
Filetype | Description |
---|---|
ps | An Encapsulated PostScript file with a compressed image. The image is centered, rotated and scaled to fill the maximum space on a page. It is displayed in color on viewers and printers that support color Postscript, otherwise it is displayed as grayscale. This format is convenient for transparency preparation. |
eps | Also an Encapsulated PostScript file with a compressed image, but the image is only centered, not rotated and scaled. It is intended for insertion into a document. |
epsi | Same as eps but contains a black and white preview |
gif | Graphics Interchange Format (GIF). Use this format when you want to keep files or transfer them to other computers. It is also convenient for visualisations, for example, with xv by John Bradley. |
ppm | PPM format from the PBM Plus library by Jef Poskanzer. Use it and a routine from the PBM Plus library if you wish to have the image in a format not mentioned above. |
xwpick
can optionally capture window borders if the mouse is selected in
that region, otherwise the window content is captured instead.