Debian Codegraph @

userguide/pamtopnm.html

raw
1 <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 3.3//EN">
2 <html><head><title>Pamtopnm User Manual</title></head>
3 <body>
4 <h1>pamtopnm</h1>
5 Updated: 02 February 2018
6 <br>
7 <a href="#index">Table Of Contents</a>
8
9 <h2>NAME</h2>
10 pamtopnm - convert PAM image to PBM, PGM, or PPM
11
12 <h2 id="synopsis">SYNOPSIS</h2>
13
14 <b>pamtopnm</b>
15
16 [<b>-assume</b>]
17
18 [<i>pnmfile</i>]
19
20 <p>Minimum unique abbreviation of option is acceptable. You may use double
21 hyphens instead of single hyphen to denote options. You may use white
22 space in place of the equals sign to separate an option name from its value.
23
24 <h2 id="description">DESCRIPTION</h2>
25
26 <p>This program is part of <a href="index.html">Netpbm</a>.
27
28 <p><b>pamtopnm</b> reads a PAM image as input and produces an
29 equivalent PBM, PGM, or PPM (i.e. PNM) image, whichever is most
30 appropriate, as output.
31
32 <p><b>pamtopnm</b> assumes the PAM image represents the information
33 required for a PBM, PGM, or PPM image if its tuple type is
34 "BLACKANDWHITE", "GRAYSCALE", or "RGB"
35 and its depth and maxval are appropriate. If this is not the case,
36 <b>pamtopnm</b> fails.
37
38 <p>However, you can override the tuple type requirement with the
39 <b>-assume</b> option.
40
41 <p><b>pamtopnm</b> produces a PPM image if the input PAM has depth 3 or 4; it
42 produces PGM or PBM if the input PAM has depth 1 or 2. Whether it produced
43 PGM or PBM depends upon the maxval: PBM for 1, PGM for anything higher. The
44 tuple type does not play a role in determining the output type. You can
45 use Netpbm programs such as <b>pgmtopgm</b> to generate a different PNM
46 output, but remember that Netpbm program that expects PGM input will take
47 PBM and so on.
48
49 <p>Note that it's possible for an image which is formally color to in fact
50 contain only shades of gray and for an image which is formally grayscale to
51 contain only black and white. This program pays no attention to that; an RGB
52 input image produces a PPM output image even if all the pixels are gray. But
53 you can use <b>ppmtopgm</b> to convert a PPM that you know is grayscale to the
54 equivalent PGM, and you can use <b>pamthreshold</b> to convert a PGM image you
55 know is black and white to a black and white PAM image and then
56 use <b>pamtopnm</b> to convert that to PBM.
57
58 <p>As with any Netpbm program that reads PAM images, <b>pamtopnm</b> also
59 reads PNM images as if they were PAM. In that case, <b>pamtopnm</b>'s
60 function reduces to simply copying the input to the output. But this can be
61 useful in a program that doesn't know whether its input is PAM or PNM but
62 needs to feed it to a program that only recognizes PNM.
63
64 <h2 id="options">OPTIONS</h2>
65
66 <p>In addition to the options common to all programs based on libnetpbm
67 (most notably <b>-quiet</b>, see <a href="index.html#commonoptions">
68 Common Options</a>), <b>pamtopnm</b> recognizes the following
69 command line option:
70
71 <dl compact>
72 <dt><b>-assume</b>
73
74 <dd>When you specify <b>-assume</b>, you tell <b>pamtopnm</b> that you
75 personally vouch for the fact that the tuples contain the same data as belongs
76 in the channels of a PBM, PGM, or PPM file, regardless of its tuple type. The
77 depth must still conform, though, so to truly force a conversion, you may have
78 to run the input through <b>pamchannel</b> first. But be careful with
79 <b>-assume</b>. When you -assume, you make an -ass of u and me.
80
81 </dl>
82
83 <h2 id="seealso">SEE ALSO</h2>
84
85 <b><a href="pbmtopgm.html">pbmtopgm</a></b>,
86 <b><a href="pamditherbw.html">pamditherbw</a></b>,
87 <b><a href="pgmtoppm.html">pgmtoppm</a></b>,
88 <b><a href="ppmtopgm.html">ppmtopgm</a></b>,
89 <b><a href="pamthreshold.html">pamthreshold</a></b>,
90 <b><a href="pam.html">pam</a></b>,
91 <b><a href="pnm.html">pnm</a></b>,
92 <b><a href="pbm.html">pbm</a></b>,
93 <b><a href="pgm.html">pgm</a></b>,
94 <b><a href="ppm.html">ppm</a></b>
95
96
97 <h2 id="history">HISTORY</h2>
98
99 <p><b>pamtopnm</b> was new, along with the PAM format, in Netpbm
100 9.7 (August 2000).
101
102 <hr>
103 <h2 id="index">Table Of Contents</h2>
104 <ul>
105 <li><a href="#synopsis">SYNOPSIS</a>
106 <li><a href="#description">DESCRIPTION</a>
107 <li><a href="#options">OPTIONS</a>
108 <li><a href="#seealso">SEE ALSO</a>
109 <li><a href="#history">HISTORY</a>
110 </ul>
111 </body>
112 </html>