pnmtoxwd
Convert a PNM file into an X11 window dump file. tldr-pages
On several platforms
Several platforms
Convert a PNM image file to XWD
pnmtoxwd path/to/input_file.pnm >path/to/output_file.xwdIdentifyProduce the output in the DirectColor format
pnmtoxwd -directcolor path/to/input_file.pnm >path/to/output_file.xwdIdentifySet the color depth of the output to b bits
pnmtoxwd -pseudodepth b path/to/input_file.pnm >path/to/output_file.xwdIdentify