.TH xwd "" "" "X Client"
.PC "Dump an image of an X window"
\fBxwd [\-add \fIvalue\^\fB] [\-debug] [\-display \fIdisplay\^\fB] [\-frame] [\-help] [\-icmap] [\-id \fIid\^\fB] [\-name \fIname\^\fB] [\-nobdrs]
	\fB[\-out \fIfile\^\fB] [\-root] [\-screen] [\-xy]\fR
.PP
.HS
.SH Options:
.IC "\fB-display \fIserver\fR"
Connect to
.I server
.IC "\fB\-frame\fR"
When dumping a window, include its frame
.IC "\fB\-help\fR"
Print a summary of the command-line options
.IC "\fB\-icmap\fR"
Obtain the window's RGB values by reading the first installed color map
.IC "\fB\-id \fIid\fR"
Dump the window with the identifier
.I id
.IC "\fB\-name \fIname\fR"
Dumped the window named
.IR name ,
as specified in the property
.B WM_NAME
.IC "\fB\-nobdrs\fR"
When dumping the window,
do not include pixels that compose the window's border
.IC "\fB\-out \fIfile\fR"
Write the output into
.I file
.IC "\fB\-root\fR"
Dump the screen's root window
.IC "\fB\-screen\fR"
Execute the
.B GetImage
request used to obtain the image on the root window,
rather than directly on the specified window
.IC "\fB\-xy\fR"
Use
.B XY
format dumping instead of the default
.B Z
format
.HE
.B xwd
dumps an X window into a file.
.II xpr
.II xwud
The contents can either be printed by the X client
.BR xpr ,
or redisplayed by the client
.BR xwud .
(For information on these clients, see their entries in this Lexicon.)
You can select the window to dump either interactively
(by moving the mouse cursor into the window and clicking any mouse button),
or by giving on the command line the window's name or identifier.
.PP
.B xwd
recognizes the following command-line options:
.IP "\fB\-add \fIvalue\fR"
Add
.I value
to every pixel, where
.B value
is a signed integer.
.IP "\fB-display \fIserver\fR"
Connect to
.IR server .
.IP "\fB\-frame\fR"
When dumping a window, include its frame.
.IP "\fB\-help\fR"
Print a summary of the command-line options.
.IP "\fB\-icmap\fR"
Obtain the window's RGB values by reading the first installed color map.
By default,
.B xwd
obtains these values by reading the window's color map.
.IP "\fB\-id \fIid\fR"
Dump the window with the identifier
.IR id .
.IP "\fB\-name \fIname\fR"
Dumped the window named
.IR name ,
as specified in the property
.BR WM_NAME .
.IP "\fB\-nobdrs\fR"
When dumping the window,
do not include pixels that compose the window's border.
This is useful in situations where you wish to use the window's
contents as an illustration in a document.
.IP "\fB\-out \fIfile\fR"
Write the output into
.IR file .
The default is to write to the standard output.
.IP "\fB\-root\fR"
Dump the screen's root window.
Note that this dumps an image of the virtual screen, not the physical screen;
so when you redisplay or print this image, you may get more than you expected.
.IP "\fB\-screen\fR"
Execute the
.B GetImage
request used to obtain the image on the root window,
rather than directly on the specified window.
This lets you obtain pieces of other windows that overlap the specified window,
and capture menus or other pop-up items that are independent
windows but which are superimposed upon the specified window.
.IP "\fB\-xy\fR"
Use
.B XY
format dumping instead of the default
.B Z
format.
This option applies to color displays only.
.SH Environment
.B xwd
reads the environmental variable
.B DISPLAY
to get the numbers of the default host and display.
.SH Files
\fBXWDFile.h\fR \(em Define the format of the X Window dump file
.SH "See Also"
.B
xpr,
X clients,
xwud
.R
.SH Notes
Copyright \(co 1988, Massachusetts Institute of Technology.
.PP
.II "Della Fera, Tony"
.II "Wyatt, William F."
.B xwd
was written by Tony Della Fera of Digital Equipment Corp. and
MIT Project Athena, and William F. Wyatt of the
Smithsonian Astrophysical Observatory.
