<s>
In	O
the	O
X	B-Operating_System
Window	I-Operating_System
System	I-Operating_System
,	O
the	O
program	B-Application
xwd	B-Protocol
(	O
X	B-Operating_System
Window	I-Operating_System
dump	O
)	O
captures	O
the	O
content	O
of	O
a	O
screen	O
or	O
of	O
a	O
window	O
and	O
optionally	O
saves	O
it	O
into	O
a	O
file	B-Operating_System
.	O
</s>
<s>
xwd	B-Protocol
runs	O
in	O
one	O
of	O
two	O
ways	O
:	O
if	O
a	O
user	O
specifies	O
the	O
whole	O
screen	O
or	O
the	O
name	O
or	O
identifier	O
of	O
a	O
window	O
as	O
an	O
argument	O
,	O
the	O
program	B-Application
captures	O
the	O
content	O
of	O
the	O
window	O
;	O
otherwise	O
,	O
it	O
changes	O
the	O
shape	O
of	O
the	O
cursor	B-Application
and	O
waits	O
for	O
the	O
user	O
to	O
click	O
in	O
a	O
window	O
,	O
whose	O
content	O
is	O
then	O
captured	O
.	O
</s>
<s>
At	O
the	O
X	B-Device
Window	I-Device
core	I-Device
protocol	I-Device
level	O
,	O
xwd	B-Protocol
uses	O
the	O
fact	O
that	O
any	O
X	B-Operating_System
client	O
can	O
request	O
the	O
content	O
of	O
an	O
arbitrary	O
window	O
,	O
including	O
ones	O
it	O
did	O
not	O
create	O
,	O
using	O
the	O
GetImage	O
request	O
(	O
this	O
is	O
done	O
by	O
the	O
XGetImage	O
function	O
in	O
the	O
Xlib	B-Language
library	O
)	O
.	O
</s>
<s>
The	O
content	O
of	O
the	O
whole	O
screen	O
is	O
obtained	O
by	O
requesting	O
the	O
content	O
of	O
the	O
root	B-Device
window	I-Device
.	O
</s>
<s>
The	O
file	B-Operating_System
generated	O
by	O
xwd	B-Protocol
can	O
then	O
be	O
read	O
by	O
various	O
other	O
X	B-Operating_System
utilities	O
such	O
as	O
xwud	B-Protocol
,	O
sxwd	O
,	O
xv	B-Application
,	O
and	O
the	B-Application
GIMP	I-Application
,	O
or	O
converted	O
to	O
other	O
formats	O
;	O
the	O
netpbm	B-Language
suite	O
allows	O
the	O
construction	O
of	O
a	O
useful	O
pipeline	B-Operating_System
:	O
</s>
<s>
The	O
dumps	O
are	O
larger	O
in	O
size	O
than	O
files	O
in	O
most	O
image	O
file	B-Operating_System
formats	O
–	O
not	O
only	O
compressed	O
formats	O
such	O
as	O
PNG	O
,	O
but	O
also	O
uncompressed	O
bitmap	O
formats	O
like	O
BMP	B-Device
.	O
</s>
<s>
Various	O
image	O
viewers	O
and	O
tools	O
support	O
the	O
X11	B-Operating_System
.xwd	O
format	O
,	O
among	O
others	O
the	B-Application
GIMP	I-Application
,	O
ImageMagick	B-Language
,	O
Netpbm	B-Language
,	O
and	O
XnView	B-Protocol
.	O
</s>
<s>
In	O
version	O
2.1.4	O
FFmpeg	B-Library
supported	O
pixel	O
formats	O
bgra	O
,	O
rgba	O
,	O
argb	O
,	O
abgr	O
,	O
rgb24	O
,	O
bgr24	O
,	O
rgb565be	O
,	O
rgb565le	O
,	O
bgr565be	O
,	O
bgr565le	O
,	O
rgb555be	O
,	O
rgb555le	O
,	O
bgr555be	O
,	O
bgr555le	O
,	O
rgb8	O
,	O
bgr8	O
,	O
rgb4_byte	O
,	O
bgr4_byte	O
,	O
pal8	O
,	O
gray	O
,	O
and	O
monow	O
.	O
</s>
<s>
In	O
these	O
abbreviations	O
555	O
means	O
32768	O
=	O
32×32×32	O
colors	O
,	O
565	O
means	O
65536	O
colors	O
(	O
6	O
bits	O
for	O
green	O
)	O
,	O
rgba	O
is	O
red-green-blue-alpha	O
,	O
4	O
or	O
8	O
stands	O
for	O
16	O
or	O
256	O
colors	O
,	O
le	O
or	O
be	O
is	O
the	O
endianness	O
,	O
pal	O
is	O
an	O
input	O
palette	B-Data_Structure
,	O
etc	O
.	O
</s>
<s>
as	O
listed	O
by	O
ffmpeg	B-Library
–	O
pix_fmts	O
.	O
</s>
<s>
Details	O
of	O
the	O
.xwd	O
format	O
in	O
xwdfile.h	O
depend	O
on	O
the	O
platform	O
,	O
therefore	O
it	O
is	O
unsuited	O
for	O
cross-platform	O
applications	O
and	O
has	O
no	O
MIME	B-Protocol
image	O
type	O
.	O
</s>
