World Library  
Flag as Inappropriate
Email this Article


Article Id: WHEBN0003064194
Reproduction Date:

Title: Xwd  
Author: World Heritage Encyclopedia
Language: English
Subject: Screenshot, X Window programs, CALS Raster file format, FLIC (file format), Xar (graphics)
Collection: Graphics File Formats, Screenshot Software, X Window Programs, X Window System
Publisher: World Heritage Encyclopedia


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 1
  • Image format 2
  • See also 3
  • References 4
  • External links 5


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 window.

The file generated by xwd can then be read by various other X utilities such as xwud, xv, and the GIMP, or converted to other formats; the netpbm suite allows the construction of a useful pipeline:

$ xwd | xwdtopnm | pnmtopng > Screenshot.png

The dumps are larger in size than files in most image file formats – not only compressed formats such as PNG, but also uncompressed bitmap formats like BMP.

X Window Dump
Filename extension .xwd
Developed by X Window System
Initial release X10 / 1985 (1985)
Latest release
(September 1987 (1987-09))
Type of format Image file formats
Standard xwdfile.h[2]
Open format? MIT license

Image format

Various image viewers and tools support the X11 .xwd format, among others the GIMP, ImageMagick, Netpbm, and XnView. In version 2.1.4 FFmpeg supported pixel formats bgra, rgba, argb, abgr, rgb24, bgr24, rgb565be, rgb565le, bgr565be, bgr565le, rgb555be, rgb555le, bgr555be, bgr555le, rgb8, bgr8, rgb4_byte, bgr4_byte, pal8, gray, and monow. In these abbreviations 555 means 32768=32×32×32 colors, 565 means 65536 colors (6 bits for green), rgba is red-green-blue-alpha, 4 or 8 stands for 16 or 256 colors, le or be is the endianess, 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


  1. ^
  2. ^ a b
  3. ^

External links

  • xwd manual page
  • xwud manual page
  • xwd is part of tar.gz
  • Image::XWD Perl package at CPAN
This article was sourced from Creative Commons Attribution-ShareAlike License; additional terms may apply. World Heritage Encyclopedia content is assembled from numerous content providers, Open Access Publishing, and in compliance with The Fair Access to Science and Technology Research Act (FASTR), Wikimedia Foundation, Inc., Public Library of Science, The Encyclopedia of Life, Open Book Publishers (OBP), PubMed, U.S. National Library of Medicine, National Center for Biotechnology Information, U.S. National Library of Medicine, National Institutes of Health (NIH), U.S. Department of Health & Human Services, and, which sources content from all federal, state, local, tribal, and territorial government publication portals (.gov, .mil, .edu). Funding for and content contributors is made possible from the U.S. Congress, E-Government Act of 2002.
Crowd sourced content that is contributed to World Heritage Encyclopedia is peer reviewed and edited by our editorial staff to ensure quality scholarly research articles.
By using this site, you agree to the Terms of Use and Privacy Policy. World Heritage Encyclopedia™ is a registered trademark of the World Public Library Association, a non-profit organization.

Copyright © World Library Foundation. All rights reserved. eBooks from Project Gutenberg are sponsored by the World Library Foundation,
a 501c(4) Member's Support Non-Profit Organization, and is NOT affiliated with any governmental agency or department.