XWD converter

Convert XWD images to PNG; transparency is preserved.

FluffyShield Protected workspace
From
To

Choosing a format opens another page, set to that conversion. Images you've added here come along. Finished files don't, so download them first.

FluffyShield

Isolated workspace: other page scripts can't read your files. How FluffyShield works

Free · No upload · No sign-up · No usage quotas

PNG options here: browser or advanced encoder; RGBA, RGB, grayscale or indexed color; 8- or 16-bit; Fast, Balanced or Maximum compression; interlacing. Which PNG settings are worth changing?

How it works
  1. Choose XWD files
  2. Pick PNG, JPG or WebP
  3. Convert
  4. Download your copies

What it does

Color dumps stay exact

32-bit and palette dumps open as regular pictures.

Photo dump: 0 of 55,296 pixels changed

Reads color tables

An 8-bit dump with a 256-color table converts like any other.

One screenshot or many

Convert a folder of dumps in one run, all on your device.

Limits One-bit dumps open inverted.

Which app opens a window dump made with xwd?

Your browser can, through FluffyBench's XWD converter. It turns the dump into a PNG that opens anywhere, and color dumps come through pixel for pixel.

What does the xwd command actually save?

XWD is what you get when you run the xwd command on a Linux or Unix desktop and click a window.

Think of it as a photograph of the screen straight from the camera, with no darkroom work done. The file holds a short header, an optional color table, then the pixels laid out the way the X server held them in memory. Nothing is squeezed, so the file is as big as its pixel count demands.

The first four pixels of our 32-bit photo dump, read straight from the file.

PixelBlueGreenRedSpare
Pixel 112250150
Pixel 212250160
Pixel 312150130
Pixel 412251130
Bytes read from the sample dump, shown as numbers from 0 to 255. The first three bytes of each pixel are blue, green and red, in that order. The spare byte is zero in every pixel of this dump; XWD has no transparency, so FluffyBench drops it. Every pixel takes four bytes even though the picture is opaque, which is why a 32-bit dump is so large. How we measured

Does every pixel of a color dump make it into the PNG?

Every one. We converted four dumps made from a photo and a graphic: two in 32-bit color, one with an 8-bit color table and one with a single bit per pixel. Each color dump came out with exactly the pixels stored in it; for the photo, that was 0 pixels changed.

A 32-bit color dump shrinks as a PNG, because PNG compresses and XWD doesn't. Palette and one-bit dumps are already compact, so their PNGs come out larger.

As a PNG, the photo dump shrank 40% and the one-bit dump grew 92%

32-bit photo

XWD dump 221.3 KB
PNG 132.7 KB

32-bit graphic

XWD dump 200.8 KB
PNG 112.8 KB

8-bit palette

XWD dump 53.4 KB
PNG 107.1 KB

One-bit

XWD dump 6.4 KB
PNG 12.3 KB

File size, KB

Each group compares one dump with the PNG FluffyBench makes from it; sizes are rounded to 0.1 KB.

Doing it in FluffyBench's XWD converter

FluffyBench's XWD converter works in your browser, so the screenshot stays on your device. These steps go from choosing the dump to saving its PNG.

  1. Pick the XWD file with Choose images. To is already PNG, so the copy opens in any image app.

  2. On a phone, the gear button opens Settings, which holds the size choice. Under Size, Original keeps the picture's pixel size.

    The Size control set to Original, outlined.
    The Size control set to Original, outlined.
  3. Close Settings with the gear button, then press Convert to make the PNG.

  4. The tile shows the PNG's dimensions and file size. Download saves the PNG.

    The finished PNG with its size and the Download button outlined.
    The finished PNG with its size and the Download button outlined.

Dumps are big, so a folder of them is where the PNG savings add up: our batch of 1,000 files reported “1000 of 1000 done · 221.3 MB → 132.7 MB · 40% saved.”

Why does a black-and-white dump come out inverted?

Because FluffyBench paints a stored 1 as white, while the usual X bitmap habit is that a 1 means a dark pixel. A one-bit dump made that way opens as a negative, so flip it back with the invert command in an image editor.

A palette dump, which looks each pixel up in a table of up to 256 colors, opens the right way round. Any coarse shading in it was there when the file was made.

Three of our dumps of the same Earth picture, as FluffyBench opens them: 32-bit color, an 8-bit color table, and one bit per pixel.

The Earth in full color on a white background.

32-bit color

The Earth on white with coarser, speckled colors.

8-bit palette

The Earth as white shapes on black, a negative of the picture.

One bit

The same Earth, read from three kinds of dump. The 32-bit dump stores four bytes per pixel, so every color the picture had is there. In the palette dump each pixel is a number looked up in a table of 256 colors, so shading comes out coarser. The one-bit dump opens as a negative: light and dark trade places in all 50,176 pixels. · Photo: NASA, Public domain, NASA-created image, via Wikimedia Commons.

Can you save a picture as XWD?

Yes, from a PNG, a JPG or another picture. The result is always a 32-bit color file with no transparency, so see-through areas land on white. It's as big as the raw pixels, too: our photo came out at 221.3 KB, and opening it again changed no pixels.

That size is the reason to keep XWD for the programs that ask for it. For anything else, the PNG is the better copy.

Which window grabs won't convert?

Some window grabs store each row shifted sideways, which the file's header calls an x offset. FluffyBench refuses those with “XWD ZPixmap images with a nonzero xoffset are not handled.” Other header versions are refused too. A damaged file fails just as plainly: a dump cut to half its length reports “The XWD color table or raster data is truncated.”

Once the PNG looks right, you're done. If it's still too heavy for an email or an upload, one more FluffyBench tool can help.

The picture is too big to send or upload.

FluffyBench's Image Space Saver

It opens the XWD dump itself and shrinks it toward a file size you choose.

Need a Sun Raster image instead?

Need a PNG from an X11 capture?

Search FluffyBench