The PNM Format(5) File Formats Manual The PNM Format(5)NAME
pnm - Netpbm superformat
DESCRIPTION
The PNM format is just an abstraction of the PBM, PGM, and PPM formats. I.e. the name 'PNM' refers collectively to PBM, PGM, and PPM.
The name 'PNM' is an acronym derived from 'Portable Any Map.' This derivation makes more sense if you consider it in the context of the
other Netpbm format names: PBM, PGM, and PPM.
The more general term 'Netpbm format' refers to the PNM formats plus PAM.
PNM is principally used with Netpbm(1)
Note that besides being names of formats, PBM, PGM, PPM, and PNM are also classes of programs. A PNM program can take PBM, PGM, or PPM
input. That's nothing special -- a PPM program can too. But a PNM program can often produce multiple output formats as well, and a PNM
program can see the difference between PBM, PGM, and PPM input and respond to each differently whereas a PPM program sees everything as if
it were PPM. This is discussed more in the description of the netpbm programs (1)
'pnm' also appears in the names of the most general Netpbmlibraryroutines(3) , some of which aren't even related to the PNM format.
SEE ALSO ppm(5) , pgm(5) , pbm(5) , pam(5) , programsthatprocessPNM(1) , libnetpbm(3)netpbm documentation 03 October 2003 The PNM Format(5)
Check Out this Related Man Page
pamtopnm(1) General Commands Manual pamtopnm(1)NAME
pamtopnm - convert PAM image to PBM, PGM, or PPM
SYNOPSIS
pamtopnm [-assume] [pnmfile]
All options may be abbreviated to the shortest unique prefix.
DESCRIPTION
Reads a PAM image as input. Produces an equivalent PBM, PGM, or PPM (i.e. PNM) image, whichever is most appropriate, as output.
pamtopnm assumes the PAM image represents the information required for a PBM, PGM, or PPM image if its tuple type is "BLACKANDWHITE",
"GRAYSCALE", or "RGB" and its depth and maxval are appropriate. If this is not the case, pamtopnm fails.
However, you can override the tuple type requirement with the -assume option.
As with any Netpbm program that reads PAM images, pamtopnm also reads PNM images as if they were PAM. In that case, pamtopnm's functions
reduces to simply copying the input to the output. But this can be useful in a program that doesn't know whether its input is PAM or PNM
but needs to feed it to a program that only recognizes PNM.
OPTIONS -assume
When you specify -assume, you tell pamtopnm that you personally vouch for the fact that the tuples contain the same data as belongs
in the channels of a PBM, PGM, or PPM file. The depth must still conform, though, so to truly force a conversion, you may have to
run the input through pamchannel first. But be careful with -assume. When you -assume, you make an -ass of u and me.
SEE ALSO pbmtopgm(1), pgmtopbm(1), pgmtoppm(1), ppmtopgm(1), pam(5), pnm(5), pbm(5), pgm(5), ppm(5)
03 August 2000 pamtopnm(1)
I have an input which is like this
I have an input which is like this
#RowNum ClassNUm Date Pass Mark1 Mark2
#------------------------------------------------------------
0100 201 20070909 0 90 100
0100 203 20070909 1 100 100
0100 301 20070909 0 45 99
0100 231 20070909 ... (2 Replies)