1Xwdtopnm User Manual(0)                                Xwdtopnm User Manual(0)
2
3
4

NAME

6       xwdtopnm - convert an X11 or X10 window dump file to a PNM image
7
8

SYNOPSIS

10       xwdtopnm [-verbose] [-headerdump] [xwdfile]
11
12

DESCRIPTION

14       This program is part of Netpbm(1).
15
16       xwdtopnm  reads  an X11 or X10 window dump file as input and produces a
17       PNM image as output.  The type of the output image depends on the input
18       file  - if it's black and white, the output is PBM.  If it's grayscale,
19       the output is PGM.  Otherwise, it's PPM.  The program tells  you  which
20       type it is writing.
21
22       Using  this  program,  you can convert anything you can display on an X
23       workstation's screen into a PNM image.  Just  display  whatever  you're
24       interested  in, run the xwd program to capture the contents of the win‐
25       dow, run it through xwdtopnm, and then use pamcut to  select  the  part
26       you want.
27
28       Note that a pseudocolor XWD image (typically what you get when you make
29       a dump of a pseudocolor X window) has maxval 65535, which means the PNM
30       file  that  xwdtopnm generates has maxval 65535.  Many older image pro‐
31       cessing programs (that aren't part of the Netpbm package and don't  use
32       the  Netpbm  programming  library) don't know how to handle a PNM image
33       with maxval greater than 255 (because there are two  bytes  instead  of
34       one  for  each sample in the image).  So you may want to run the output
35       of xwdtopnm through pamdepth before feeding it to one of these old pro‐
36       grams.
37
38       xwdtopnm can't convert every kind of XWD image (which essentially means
39       it can't convert an XWD created from every kind of X display configura‐
40       tion).  In particular, it cannot convert one with more than 24 bits per
41       pixel.
42
43
44

OPTIONS

46       In addition to the options common to all programs  based  on  libnetpbm
47       (most notably -quiet, see
48        Common  Options  ⟨index.html#commonoptions⟩ ), xwdtopnm recognizes the
49       following command line options:
50
51
52
53       -verbose
54              This option causes xwdtopnm to display handy  information  about
55              the input image and the conversion process
56
57
58       -headerdump
59              This  option  causes xwdtopnm to display the contents of the X11
60              header.  It has no effect when the input is  X10.   This  option
61              was new in Netpbm 10.26 (December 2004).
62
63
64
65

NOTES

67   Two Byte Samples
68       xwdtopnm  sometimes  produces  output  with  a maxval greater than 255,
69       which means the maximum value of a sample (one  intensity  value,  e.g.
70       the  red  component  of a pixel) is greater than 255 and therefore each
71       sample takes 2 bytes to represent.  This can be a problem because  some
72       programs  expect  those bytes in a different order from what the Netpbm
73       format specs say, which is what xwdtopnm  produces,  which  means  they
74       will  see  totally  different colors than they should.   xv is one such
75       program.
76
77       If this is a problem (e.g. you want to look at the output  of  xwdtopnm
78       with xv), there are two ways to fix it:
79
80
81
82       •      Pass the output through pamendian to produce the format the pro‐
83              gram expects.
84
85       •      Pass the output through pamdepth to reduce the maxval below  256
86              so there is only one byte per sample.
87
88
89       Often,  there  is no good reason to have a maxval greater than 255.  It
90       happens because in XWD, but not PNM, each color component  of  a  pixel
91       can have different resolution, for example 5 bits for blue (maxval 31),
92       5 bits for red (maxval 31), and 6 bits for green (maxval 63), for a to‐
93       tal  of 16 bits per pixel.  In order to reproduce the colors as closely
94       as possible, xwdtopnm has to use a large maxval.  In this  example,  it
95       would use 31 * 63 = 1953, and use 48 bits per pixel.
96
97       Because  this  is a common and frustrating problem when using xwdtopnm,
98       the program issues a warning whenever it generates output with two byte
99       samples.   You  can  quiet  this  warning with the -quiet common option
100       ⟨index.html#commonoptions⟩ .  The  warning  was  new  in  Netpbm  10.46
101       (March 2009).
102
103
104

SEE ALSO

106       pnmtoxwd(1), pamendian(1), pamdepth(1), pnm(1), xwd man page
107
108

AUTHOR

110       Copyright (C) 1989, 1991 by Jef Poskanzer.
111

DOCUMENT SOURCE

113       This  manual  page was generated by the Netpbm tool 'makeman' from HTML
114       source.  The master documentation is at
115
116              http://netpbm.sourceforge.net/doc/xwdtopnm.html
117
118netpbm documentation            08 January 2010        Xwdtopnm User Manual(0)
Impressum