Debian Codegraph @

upstream/debian-unstable/man1/pamtopnm.1

raw
1 \
2 .\" This man page was generated by the Netpbm tool 'makeman' from HTML source.
3 .\" Do not hand-hack it! If you have bug fixes or improvements, please find
4 .\" the corresponding HTML page on the Netpbm website, generate a patch
5 .\" against that, and send it to the Netpbm maintainer.
6 .TH "Pamtopnm User Manual" 1 "02 February 2018" "netpbm documentation"
7
8 .SH NAME
9 pamtopnm - convert PAM image to PBM, PGM, or PPM
10
11 .UN synopsis
12 .SH SYNOPSIS
13
14 \fBpamtopnm\fP
15
16 [\fB-assume\fP]
17
18 [\fIpnmfile\fP]
19 .PP
20 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 .UN description
25 .SH DESCRIPTION
26 .PP
27 This program is part of
28 .BR "Netpbm" (1)\c
29 \&.
30 .PP
31 \fBpamtopnm\fP reads a PAM image as input and produces an
32 equivalent PBM, PGM, or PPM (i.e. PNM) image, whichever is most
33 appropriate, as output.
34 .PP
35 \fBpamtopnm\fP assumes the PAM image represents the information
36 required for a PBM, PGM, or PPM image if its tuple type is
37 "BLACKANDWHITE", "GRAYSCALE", or "RGB"
38 and its depth and maxval are appropriate. If this is not the case,
39 \fBpamtopnm\fP fails.
40 .PP
41 However, you can override the tuple type requirement with the
42 \fB-assume\fP option.
43 .PP
44 \fBpamtopnm\fP produces a PPM image if the input PAM has depth 3 or 4; it
45 produces PGM or PBM if the input PAM has depth 1 or 2. Whether it produced
46 PGM or PBM depends upon the maxval: PBM for 1, PGM for anything higher. The
47 tuple type does not play a role in determining the output type. You can
48 use Netpbm programs such as \fBpgmtopgm\fP to generate a different PNM
49 output, but remember that Netpbm program that expects PGM input will take
50 PBM and so on.
51 .PP
52 Note that it's possible for an image which is formally color to in fact
53 contain only shades of gray and for an image which is formally grayscale to
54 contain only black and white. This program pays no attention to that; an RGB
55 input image produces a PPM output image even if all the pixels are gray. But
56 you can use \fBppmtopgm\fP to convert a PPM that you know is grayscale to the
57 equivalent PGM, and you can use \fBpamthreshold\fP to convert a PGM image you
58 know is black and white to a black and white PAM image and then
59 use \fBpamtopnm\fP to convert that to PBM.
60
61 .PP
62 As with any Netpbm program that reads PAM images, \fBpamtopnm\fP also
63 reads PNM images as if they were PAM. In that case, \fBpamtopnm\fP's
64 function reduces to simply copying the input to the output. But this can be
65 useful in a program that doesn't know whether its input is PAM or PNM but
66 needs to feed it to a program that only recognizes PNM.
67
68 .UN options
69 .SH OPTIONS
70 .PP
71 In addition to the options common to all programs based on libnetpbm
72 (most notably \fB-quiet\fP, see
73 .UR index.html#commonoptions
74 Common Options
75 .UE
76 \&), \fBpamtopnm\fP recognizes the following
77 command line option:
78
79
80 .TP
81 \fB-assume\fP
82 When you specify \fB-assume\fP, you tell \fBpamtopnm\fP that you
83 personally vouch for the fact that the tuples contain the same data as belongs
84 in the channels of a PBM, PGM, or PPM file, regardless of its tuple type. The
85 depth must still conform, though, so to truly force a conversion, you may have
86 to run the input through \fBpamchannel\fP first. But be careful with
87 \fB-assume\fP. When you -assume, you make an -ass of u and me.
88
89
90
91 .UN seealso
92 .SH SEE ALSO
93 .BR "pbmtopgm" (1)\c
94 \&,
95 .BR "pamditherbw" (1)\c
96 \&,
97 .BR "pgmtoppm" (1)\c
98 \&,
99 .BR "ppmtopgm" (1)\c
100 \&,
101 .BR "pamthreshold" (1)\c
102 \&,
103 .BR "pam" (1)\c
104 \&,
105 .BR "pnm" (1)\c
106 \&,
107 .BR "pbm" (1)\c
108 \&,
109 .BR "pgm" (1)\c
110 \&,
111 .BR "ppm" (1)\c
112 \&
113
114
115 .UN history
116 .SH HISTORY
117 .PP
118 \fBpamtopnm\fP was new, along with the PAM format, in Netpbm
119 9.7 (August 2000).
120 .SH DOCUMENT SOURCE
121 This manual page was generated by the Netpbm tool 'makeman' from HTML
122 source. The master documentation is at
123 .IP
124 .B http://netpbm.sourceforge.net/doc/pamtopnm.html
125 .PP