{"id":"image-x-xwindowdump","mimeType":"image/x-xwindowdump","name":"X Window Dump (Legacy MIME Alias)","shortName":"XWD","category":"Legacy \u0026 Raster Graphics","extensions":[".xwd",".wd"],"description":"The image/x-xwindowdump MIME type is a legacy, descriptive alias for the X Window Dump (XWD) format. Developed for the X Window System (X11) in the late 1980s, XWD files are created when the X server serializes the raw pixel contents of a display window into a binary file. While 'image/x-xwd' or 'image/xwd' are more commonly used in modern configurations, 'image/x-xwindowdump' was historically registered in older Apache web servers, email handlers, and Unix MIME tables to explicitly describe the file's origin. The underlying file structure remains identical to standard XWD files, featuring a 100-byte header followed by raw framebuffer data.","seo":{"title":"image/x-xwindowdump MIME Type | Developer Reference for XWD Format","description":"Complete reference for the image/x-xwindowdump MIME type: X Window Dump format, X11 legacy screenshots, MIME normalization, and file detection.","faqs":[{"question":"What is the difference between image/x-xwindowdump and image/x-xwd?","answer":"There is no difference in the underlying image file. Both refer to the X Window Dump (XWD) screenshot format. 'image/x-xwindowdump' is simply a more verbose, descriptive legacy alias found in older server configurations."},{"question":"How do I open an XWD file?","answer":"Modern web browsers and default desktop viewers do not support XWD files natively. You must use utility software like ImageMagick or GIMP to convert them into standard formats like PNG or JPEG."},{"question":"How can I detect an XWD file programmatically?","answer":"XWD files begin with a binary header. You can identify them by reading the first 4 bytes as a big-endian 32-bit integer representing the header size (typically 100 bytes or 0x64), followed by the version number 7 at offset 4."}]},"index":{"compression":["Uncompressed"],"browserSupport":{"score":1,"label":"None (Deprecated)"},"commonUses":["X Window System (X11) Display Debugging and Screenshots","Legacy Unix/Linux System Administration"]},"technical":{"magicBytes":{"hex":"00 00 00 64 (Typically indicates a 100-byte header size followed by version)","ascii":"None (Big-endian header size integer)"},"container":"XWDHeader / XWDFileHeader Structure","compressionAlgorithm":["None"],"colorDepth":["8-bit (Indexed)","16-bit (High Color)","24-bit (True Color)","32-bit (True Color with Alpha/Padding)"],"transparency":true,"animation":false,"metadata":{"exif":false,"xmp":false,"iccProfile":false},"alphaChannel":true,"progressiveLoading":false,"hdrSupport":false},"history":{"developer":"MIT / X Consortium (X Window System)","released":"1987","specification":"X Window System Protocol and Utilities Manual"},"browserSupport":{"chrome":false,"chromeVersion":"None","firefox":false,"firefoxVersion":"None","safari":false,"safariVersion":"None","edge":false,"edgeVersion":"None","internetExplorer":false},"softwareSupport":[{"name":"ImageMagick","logo":"image-magic.webp"},{"name":"GIMP","logo":"gimp.svg"},{"name":"XnView","logo":""},{"name":"X11 xwd / xwud utilities","logo":""}],"conversion":{"convertTo":["png","jpeg","bmp","tiff"],"convertFrom":["png","bmp"]},"developer":{"httpHeaders":[{"header":"Content-Type","value":"image/x-xwd"},{"header":"Content-Type","value":"image/x-xwindowdump"}],"htmlAccept":"image/x-xwd, image/x-xwindowdump, .xwd","fileDetection":["XWD files lack a human-readable magic string, but feature a reliable 8-byte big-endian header structure.","The first 4 bytes contain a 32-bit big-endian integer representing the header length (typically 100, or Hex: 00 00 00 64).","The next 4 bytes (offset 4) define the file version (typically version 7, or Hex: 00 00 00 07).","When encountering 'image/x-xwindowdump' in legacy server logs or file uploads, you can safely normalize the MIME string to 'image/x-xwd'."]},"prosCons":{"pros":["Provides an exact, raw pixel dump directly from the X11 display server memory without compression overhead","Extremely fast for Unix environments to generate during low-level graphical debugging"],"cons":["Completely uncompressed, resulting in large, bloated file sizes","Zero support in web browsers or modern desktop environments without specialized graphics translation tools","Verbose legacy MIME strings like 'image/x-xwindowdump' require backend normalization in modern applications"]},"specifications":{"url":"https://www.x.org/","rfc":"","mimeAliases":["image/x-xwd","image/xwd","application/x-xwindowdump"]},"developerSnippets":{"python":"import magic\n# Libmagic will identify XWD files based on their structural header signature\nprint(magic.from_file('screenshot.xwd', mime=True)) # Outputs 'image/x-xwd'","nodejs":"const fs = require('fs');\n// Inspecting the first 8 bytes for header size 100 (0x64) and version 7 (0x07)\nconst buffer = Buffer.alloc(8);\nconst fd = fs.openSync('screenshot.xwd', 'r');\nfs.readSync(fd, buffer, 0, 8, 0);\nfs.closeSync(fd);\nconst headerSize = buffer.readUInt32BE(0);\nconst version = buffer.readUInt32BE(4);\nconst isXWD = headerSize === 100 \u0026\u0026 version === 7;\nconsole.log('Is X Window Dump:', isXWD);","go":"import (\n    \"encoding/binary\"\n    \"os\"\n)\n// Checking the header size and version manually in Go:\n// file, _ := os.Open(\"screenshot.xwd\")\n// buf := make([]byte, 8)\n// file.Read(buf)\n// headerSize := binary.BigEndian.Uint32(buf[0:4])\n// version := binary.BigEndian.Uint32(buf[4:8])\n// isXWD := headerSize == 100 \u0026\u0026 version == 7","php":"// Normalizing legacy MIME types during file uploads\n$mime = $_FILES['upload']['type'];\nif ($mime === 'image/x-xwindowdump') {\n    $mime = 'image/x-xwd';\n}\necho $mime;"},"relatedFormats":["png"]}
