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

NAME

6       pamtopnm - convert PAM image to PBM, PGM, or PPM
7
8

SYNOPSIS

10       pamtopnm
11
12       [-assume]
13
14       [pnmfile]
15
16       Minimum  unique abbreviation of option is acceptable.  You may use dou‐
17       ble hyphens instead of single hyphen to denote options.   You  may  use
18       white space in place of the equals sign to separate an option name from
19       its value.
20
21

DESCRIPTION

23       This program is part of Netpbm(1).
24
25       pamtopnm reads a PAM image as input and  produces  an  equivalent  PBM,
26       PGM, or PPM (i.e. PNM) image, whichever is most appropriate, as output.
27
28       pamtopnm  assumes the PAM image represents the information required for
29       a PBM, PGM,  or  PPM  image  if  its  tuple  type  is  "BLACKANDWHITE",
30       "GRAYSCALE",  or  "RGB"  and  its depth and maxval are appropriate.  If
31       this is not the case, pamtopnm fails.
32
33       However, you can override the tuple type requirement with  the  -assume
34       option.
35
36       pamtopnm  produces  a  PPM  image if the input PAM has depth 3 or 4; it
37       produces PGM or PBM if the input PAM has depth 1 or 2.  Whether it pro‐
38       duced  PGM  or PBM depends upon the maxval: PBM for 1, PGM for anything
39       higher.  The tuple type does not play a role in determining the  output
40       type.   You can use Netpbm programs such as pgmtopgm to generate a dif‐
41       ferent PNM output, but remember that Netpbm program  that  expects  PGM
42       input will take PBM and so on.
43
44       Note that it's possible for an image which is formally color to in fact
45       contain only shades  of  gray  and  for  an  image  which  is  formally
46       grayscale to contain only black and white.  This program pays no atten‐
47       tion to that; an RGB input image produces a PPM output  image  even  if
48       all  the  pixels  are  gray.  But you can use ppmtopgm to convert a PPM
49       that you know is grayscale to the  equivalent  PGM,  and  you  can  use
50       pamthreshold  to  convert  a PGM image you know is black and white to a
51       black and white PAM image and then use pamtopnm to convert that to PBM.
52
53
54       As with any Netpbm program that reads PAM images, pamtopnm  also  reads
55       PNM  images  as  if  they were PAM.  In that case, pamtopnm's functions
56       reduces to simply copying the input to the output.   But  this  can  be
57       useful  in  a program that doesn't know whether its input is PAM or PNM
58       but needs to feed it to a program that only recognizes PNM.
59
60

OPTIONS

62       In addition to the options common to all programs  based  on  libnetpbm
63       (most notably -quiet, see
64        Common  Options  ⟨index.html#commonoptions⟩ ), pamtopnm recognizes the
65       following command line option:
66
67
68
69       -assume
70              When you specify -assume, you tell pamtopnm that you  personally
71              vouch  for  the  fact  that  the tuples contain the same data as
72              belongs in the channels of a PBM, PGM, or PPM file.   The  depth
73              must  still conform, though, so to truly force a conversion, you
74              may have to run the input  through  pamchannel  first.   But  be
75              careful  with  -assume.  When you -assume, you make an -ass of u
76              and me.
77
78
79
80

SEE ALSO

82       pbmtopgm(1), pamditherbw(1), pgmtoppm(1), ppmtopgm(1), pamthreshold(1),
83       pam(1), pnm(1), pbm(1), pgm(1), ppm(1)
84
85
86

HISTORY

88       pamtopnm  was  new,  along  with  the PAM format, in Netpbm 9.7 (August
89       2000).
90

DOCUMENT SOURCE

92       This manual page was generated by the Netpbm tool 'makeman'  from  HTML
93       source.  The master documentation is at
94
95              http://netpbm.sourceforge.net/doc/pamtopnm.html
96
97netpbm documentation           02 February 2018        Pamtopnm User Manual(0)
Impressum