xwd
This article includes a improve this article by introducing more precise citations. (June 2008) ) |
In the X Window System, the program xwd (X Window dump) captures the content of a screen or of a window and optionally saves it into a file.[1]
xwd
runs in one of two ways: if a user specifies the whole screen or the name or identifier of a window as an argument, the program captures the content of the window; otherwise, it changes the shape of the
cursor
and waits for the user to click in a window, whose content is then captured.
Operation
At the
X Window core protocol level, xwd uses the fact that any X client can request the content of an arbitrary window, including ones it did not create, using the
.
GetImage
request (this is done by the XGetImage
function in the Xlib library). The content of the whole screen is obtained by requesting the content of the root windowThe file generated by xwd can then be read by various other X utilities such as xwud, sxwd,
pipeline
:
$ xwd | xwdtopnm | pnmtopng > Screenshot.png
The dumps are larger in size than files in most
PNG, but also uncompressed bitmap formats like BMP
.
Filename extension | .xwd |
---|---|
Developed by | MIT license |
Image format
Various image viewers and tools support the X11 .xwd
format, among others the
red-green-blue-alpha, 4 or 8 stands for 16 or 256 colors, le or be is the endianness, pal is an input palette, etc. as listed by
ffmpeg –pix_fmts
.[3]Details of the .xwd
format in xwdfile.h
depend on the platform, therefore it is unsuited for cross-platform applications and has no MIME image type.[2]
See also
References
- ^
Tyler, Chris (2008). X Power Tools. O'Reilly Series. O'Reilly Media, Inc. p. 107. ISBN 9780596101954. Retrieved 2014-01-23.
The X window dump (xwd) tool takes a snapshot of the current screen, a manually selected window or a window designated by its numeric ID, and outputs the image to standard output or to a file.
- ^ ISBN 1-56592-161-5. Retrieved 2014-02-27.
- ^ "Image Formats". FFmpeg General Documentation. 2014. Retrieved 2014-02-23.