xwdtopnm [-verbose] [-headerdump] [xwdfile]
This program is part of Netpbm(1).
xwdtopnm reads an X11 or X10 window dump file as input and produces a PNM image as output. The type of the output image depends on the input file - if it's black and white, the output is PBM. If it's grayscale, the output is PGM. Otherwise, it's PPM. The program tells you which type it is writing.
Using this program, you can convert anything you can display on an X workstation's screen into a PNM image. Just display whatever you're interested in, run the xwd program to capture the contents of the window, run it through xwdtopnm, and then use pamcut to select the part you want.
Note that a pseudocolor XWD image (typically what you get when you make a dump of a pseudocolor X window) has maxval 65535, which means the PNM file that xwdtopnm generates has maxval 65535. Many older image processing programs (that aren't part of the Netpbm package and don't use the Netpbm programming library) don't know how to handle a PNM image with maxval greater than 255 (because there are two bytes instead of one for each sample in the image). So you may want to run the output of xwdtopnm through pamdepth before feeding it to one of these old programs.
Copyright (C) 1989, 1991 by Jef Poskanzer.