man > pnmtoxwd(1)

TLDR: pnmtoxwd (tldr-pages)

Convert a PNM file into an X11 window dump file.

  • Convert a PNM image file to XWD
    pnmtoxwd {{path/to/input_file.pnm}} > {{path/to/output_file.xwd}}
  • Produce the output in the DirectColor format
    pnmtoxwd {{-d|-directcolor}} {{path/to/input_file.pnm}} > {{path/to/output_file.xwd}}
  • Set the color depth of the output to b bits
    pnmtoxwd {{-ps|-pseudodepth}} {{b}} {{path/to/input_file.pnm}} > {{path/to/output_file.xwd}}
Pnmtoxwd User Manual(1)                General Commands Manual               Pnmtoxwd User Manual(1)

NAME
       pnmtoxwd - convert a PNM into an X11 window dump


SYNOPSIS
       pnmtoxwd

       [-pseudodepth n]

       [-directcolor]

       [pnmfile]


DESCRIPTION
       This program is part of Netpbm(1).

       pnmtoxwd  reads a PNM image as input and produces an X11 window dump as output.  You can dis‐
       play this output with xwud.

       Normally, pnmtoxwd produces a StaticGray dump file for PBM and PGM files.  For PPM, it writes
       a PseudoColor dump file if there are up to 256 colors in the input, and  a  DirectColor  dump
       file otherwise.

       In  an  X11  window dump file, various integers can be represented in either big endian (most
       significant byte first) or little endian code.  Those generated by pnmtoxwd  are  always  big
       endian.


OPTIONS
       In  addition  to  the options common to all programs based on libnetpbm (most notably -quiet,
       see ]8;;index.html#commonoptions\ Common Options]8;;\ ), pnmtoxwd recognizes the following command line options:



       -directcolor

              Output in DirectColor format.


       -pseudodepth 1-16

              Set the depth of PseudoColor dump in bits.  Values between 1 to 16 are accepted.   De‐
              fault is 8 (for a maximum of 256 colors.)




SEE ALSO
       xwdtopnm(1), pnm(1), xwud


AUTHOR
       Copyright (C) 1989, 1991 by Jef Poskanzer.

DOCUMENT SOURCE
       This  manual  page  was  generated by the Netpbm tool 'makeman' from HTML source.  The master
       documentation is at

              http://netpbm.sourceforge.net/doc/pnmtoxwd.html

netpbm documentation                      24 September 1991                  Pnmtoxwd User Manual(1)

Generated by phpman v4.9.26-1-g511901d · Markdown · JSON · MCP Author: Che Dong Under GNU General Public License
2026-08-09 09:06 @216.73.216.150
CrawledBy Mozilla/5.0 AppleWebKit/537.36 (KHTML, like Gecko; compatible; ClaudeBot/1.0; +claudebot@anthropic.com)
Valid XHTML 1.0 Transitional!Valid CSS!