Full Name | XWD (X Window Dump) |
Format ID | IG_FORMAT_XWD = 47 |
File Extension(s) | *.xwd, *.wd (for Unix) |
Data Type | Raster Image |
Data Encoding | Binary |
ImageGear Multipage Support | No |
ImageGear Alpha Channel Support | No |
ImageGear Platforms Support | WIN32, WIN64, Unix, Unix64, .NET, .NET64, MAC |
ImageGear Supported Versions:
- Version 7 for X11, June 1987 (X10 grayscale and palette only)
ImageGear Supported Features:
- IG_FLTR_DETECTSUPPORT - autodetection
- IG_FLTR_PAGEREADSUPPORT - single page file reading
- IG_FLTR_PAGEINSERTSUPPORT - single-page file writing
ImageGear Read Support:
- IG_COMPRESSION_NONE:
- Indexed RGB: 1, 4, 8 bpp;
- RGB: 24 bpp
ImageGear Write Support:
- IG_COMPRESSION_NONE:
- Indexed RGB: 1, 4, 8 bpp;
- RGB: 24 bpp
ImageGear Filter Control Parameters:
None
Comments
An XWD file can contain a representation of the window, the background, or the entire screen display. It has been designed to be a very versatile, device-independent format. See also XBM, XPM.
The general structure of the XWD graphics format begins with a long header, that is sometimes followed by a palette and contains the bitmap data. The header contains integer data and stores the header size, the XWD version, the size and location of the bitmap, the window size, location, and border width. A ByteOrder field indicates whether the bytes are stored in big-endian or little-endian order.
In the interest of making this format device-independent, the XWD supports six "visual classes" and three image formats. The visual class code is stored in the visual_class field of the header, and represents the following categories:
- Static Gray, for most monochrome screens and using a fixed device-dependent color map;
- GrayScale, for monochrome screens and using a software-supplied palette;
- StaticColor, which uses a fixed device-dependent palette;
- Pseudocolor, which uses a software-supplied palette and is intended for VGA screens;
- TrueColor, with fixed device-dependent mapping of RGB values to screen colors;
- DirectColor, with software-supplied mapping of RGB values to screen values.
The image-format categories, whose codes are stored in the pixmap_format field of the header, are called XYBitmap (1-bit), XYPixmap (single plane), and ZPixmap (two or more planes).
Where the value of pixmap_format indicates GrayScale, PseudoColor or DirectColor, a palette follows the header.
The image data is the last structure in the file. The bytes are stored in rows with groupings called "units", whose lengths are determined by the bitmap_unit field of the header.
If the pixmap_format field is 1, indicating an XYPixmap, there are multiple representations of the bitmap data, one for each color plane, where the first bitmap represents the highest bit of the data; the second bitmap represents the second-highest bit, and so on. An image with a bit depth of 4 yields a file with four bitmaps.
References Used
Brown, C. Wayne, and Barry J. Shepherd. Graphics File Formats: Reference and Guide. Greenwich, CT.: Manning Publications, 1992.
Kay, David C. and John R. Levine. Graphics File Formats. Windcrest Books, 1992.
Murray, James D. and William vanRyper. Encyclopedia of Graphics File Formats. Sebastopol, CA: O'Reilly & Associates, Inc., 1994.