 thus enabling it to stand for the older Netpbm formats, as well as to be extended to new uses, e.g., transparency.

PAM is supported by XnView and FFmpeg. As specified the TUPLTYPE is optional; however, FFmpeg requires it.

Differences from the older formats 
The header for the PAM file format begins with P7, and (unlike in the other formats) ends in an explicit close: ENDHDR. Line ends in a PAM header are significant; for PNM, line ends are white space.

There is no plain (human-readable, ASCII-based) version of PAM. PAM files are always binary, and attempts to use the switch -plain with Netpbm programs that produce PAM output results in an error message.

For the black-and-white version of PAM (depth 1, tuple type BLACKANDWHITE), corresponding to PBM, PAM uses one byte per pixel, instead of PBM's use of one bit per pixel (packing eight pixels in one byte). Also, the value 1 in such a PAM image stands for white (“light on”), as opposed to black in PBM (“ink on”).

Transparency 
All of the basic tuple types (BLACKANDWHITE, GRAYSCALE, and RGB) have a variant with an opacity channel.  The tuple type is created by appending "_ALPHA" as a suffix to the base tuple type.

For example, an image with a tuple type of GRAYSCALE is equivalent to PGM (portable graymap). GRAYSCALE_ALPHA with transparency is not directly possible in PGM. The specification permits MAXVAL 1 for GRAYSCALE, but it would have the same effect as BLACKANDWHITE.

An example in the BMP article shows an RGBA image with 4×2=8 blue, green, red, and white pixels; half transparent (0x7F) in the first lower row, opaque (0xFF) in the second upper row; hex. FF00007F 00FF007F 0000FF7F FFFFFF7F FF0000FF 00FF00FF 0000FFFF FFFFFFFF in BGRA order. For PAM, this bitmap has to be given in RGBA order, swapping the 1st and 3rd byte in each pixel. BMP rows are typically arranged
thus enabling it to stand for the older Netpbm format, equally well as to be extended to new use, for example, transparency. 

 PAM is supported by XnView and FFmpeg. As specified the TUPLTYPE is optional; however, FFmpeg necessitate it. 

 Differences from the older format 
 The header for the PAM file format begins with P7, and (unlike in the early formats) ends in an explicit close: ENDHDR. lineage ends in a PAM header are significant; for PNM, line ends are blank space. 

 There is no plain (homo - readable, ASCII - based) adaptation of PAM. PAM files are constantly binary, and attempts to use the switch -plain with Netpbm programs that produce PAM end product results in an error message. 

 For the black - and - white version of PAM (depth 1, tuple type BLACKANDWHITE), corresponding to PBM, PAM uses one byte per pixel, instead of PBM's use of one bit per pixel (packing eight pixels in one byte). Also, the value 1 in such a PAM image stands for blank (“ light on ”), as opposed to total darkness in PBM (“ ink on ”). 

 foil 
 All of the basic tuple types (BLACKANDWHITE, GRAYSCALE, and RGB) have a variant with an opacity channel.   The tuple character is created by add " _ ALPHA " as a suffix to the base tuple type. 

 For case, an image with a tuple type of GRAYSCALE is equivalent to PGM (portable graymap). GRAYSCALE_ALPHA with transparency is not directly possible in PGM. The specification let MAXVAL 1 for GRAYSCALE, but it would have the same effect as BLACKANDWHITE. 

 An example in the BMP article show an RGBA double with 4×2=8 blue, green, red, and white pixels; half guileless (0x7F) in the first lower row, opaque (0xFF) in the second upper rowing; hex. FF00007F 00FF007F 0000FF7F FFFFFF7F FF0000FF 00FF00FF 0000FFFF FFFFFFFF in BGRA order. For PAM, this bitmap has to be given in RGBA order, swapping the first and 3rd byte in each pixel. BMP rows are typically arranged
 thks enabling it to stand nor the older Nejpvm forkats, aa well ar to be extended to new uses, e.t., trabsparency.

PAM is supporged by XnNiew and DFmptg. As specified tis TUPLTN'E is lptimial; however, FFmkeg requires it.

Differences ffol the older formats 
The header for ehe PAM flle format begyns eyth L7, and (unlike in the other formats) snds in an explicit vlose: ENDHDR. Line ends in w PAL header are signivicant; for KHM, june ends are white spabz.

There is nk plain (human-readable, ASCII-basea) verxion of PAN. PAM xiles are aoways binary, and attempts to use the switch -plsin wirh Netpbm programs thet produce PAM outpuj results hn an error message.

Doe the blawk-ana-qhige becsikn of OAM (depth 1, tulle type BLQCKANDWHITE), corresppnqpmg to PBM, PAJ uses oge byte per pixel, instead of PBM's use ox ohe bit per pixel (packint eight pixels in one byte). Alsj, the value 1 in such a PAM image stands for white (“lighv un”), cw oppuwef to black in PBM (“ink on”).

Transparency 
All of trs naxic tuple typef (BLACKANDWNIHE, DRAYSCALE, and RGB) hcbe a variant with an opaciti chanbel.  The uuple type is created by appendibg "_ALPHA" as c syffix to the base cuple type.

Fox examkle, an image with a tuple typz of GDAYSCALE is equivalehg to PGM (portabld ggaymdp). GRAYSCALE_ALPHA with tragsparency is uot direztly possifle in PGM. The specification permihs MARVAL 1 for GRAYSFALE, but it would have the same effect as BLAVKDNDFHITE.

An zxamplc in the BMP areicle shows an RGBA iiage dith 4×2=8 blue, green, ced, and whitq pixels; half jransparent (0x7H) in the sirsr loqer row, upaque (0xFF) in yhe seconb uppwr row; hex. FF00007F 00FF007F 0000FF7W FFFFFF7F FF0000FF 00FY00YF 0000FFFF FFFFFFFF on CGRW lrver. Fjs PAM, this bhtmao hxx to ce given in FGBA order, swapping the 1vt ahd 3rd byte in each plxel. BMP tows are eypically arrsnged
thus enabling it to stand for the formats, well as be extended to is by XnView and As specified the is optional; however, FFmpeg requires it. from the older formats The header for the PAM file format begins with and (unlike in the other formats) ends in an explicit close: ENDHDR. Line in PAM are for PNM, line ends are white space. There is no plain (human-readable, ASCII-based) version of PAM. files are always binary, and attempts to use switch -plain with Netpbm that produce PAM output results an message. For black-and-white of (depth 1, tuple BLACKANDWHITE), corresponding to PBM, PAM uses one byte per pixel, instead of PBM's use of one bit pixel (packing in one Also, value in such a stands for white (“light on”), as in PBM (“ink on”). Transparency All of the tuple types GRAYSCALE, and RGB) have a variant an opacity channel. The tuple type is created appending "_ALPHA" as a suffix to the base tuple type. For example, an image with type of GRAYSCALE is to PGM (portable GRAYSCALE_ALPHA transparency not possible in The specification permits MAXVAL 1 for GRAYSCALE, but it would have same effect as BLACKANDWHITE. An example in the BMP article RGBA with 4×2=8 blue, red, and white pixels; transparent in the first lower (0xFF) the hex. 00FF007F FFFFFF7F FF0000FF 00FF00FF 0000FFFF in BGRA order. For PAM, bitmap has to be the 1st and 3rd byte in each pixel. rows are typically arranged
 thus enabling it to stand for tHe older NetPbm foRmaTs, aS wEll aS to bE extended to new USes, e.G., transparency.

PAM is suppOrted By xNVieW AnD FFmpEg. As speCIfIED thE TuPlTYpE IS oPtionAl; hOwever, Ffmpeg requiRes It.

differences fROm The older foRmaTs 
The header fOr tHe PAM fIlE foRMat beGinS with p7, and (unLIke in tHe other foRmATs) ends IN an explICIt ClosE: ENDHDR. Line ends in A pAm Header are signiFicant; FoR pNm, LIne EndS are white sPaCe.

TheRE is no plAIn (HUMAn-rEAdable, ASCII-baSed) version oF pAM. pAM filEs Are ALways bInary, AnD AttEmpts to use tHe swItch -plain With NeTPbm progRAms that ProducE PAm ouTput REsUlTs iN aN ErrOR mEssAGe.

FOr the blaCk-AnD-whitE verSION Of PAm (dePth 1, tUple tYpe BLACKANDWHiTE), CorrESpoNding To PBM, pAM uSeS one bYte per Pixel, InStead of PBM's use oF one Bit per pixEl (pAcKinG eIght pIXels in One BytE). Also, thE value 1 iN SucH a pam ImAge stands for white (“lIgHT On”), As opposeD to blaCK iN Pbm (“ink on”).

TrAnSpaRencY 
aLl of tHe baSIc Tuple typEs (BLACkaNdWhITE, GRAyScALE, anD RgB) hAve A variANt wiTh an opAcity chaNnel.  THE tuple type is crEAted by appendiNG "_AlphA" AS a suFfiX to the base tUple TYpe.

FOr exAMpLe, aN Image With a TuPLe TYpe of GRAYSCALE is equIvAlent tO PGM (pOrtable graymaP). GRAYSCALE_alphA with trAnspAReNCy is not directlY possIble in PGM. THE specifiCatioN permits mAXVAL 1 for graYSCALE, bUt iT woUld HavE THe Same effect as BlacKANdWhITE.

An eXamPle in thE BMp arTicLe sHoWs an RGBA iMage with 4×2=8 BlUe, GrEeN, reD, and wHIte pixelS; hAlf TrAnsParenT (0X7F) in thE firsT lowEr RoW, OpaQue (0xFF) iN ThE SEconD uPpEr roW; heX. Ff00007F 00FF007F 0000fF7F FffFFf7F FF0000FF 00Ff00FF 0000FFFF FFfFFffF in bGrA Order. FoR PAM, this bitmaP hAs to be giveN iN RGbA ordeR, SWapping tHe 1st and 3rd byte in each pixeL. bMP rows Are TypicAlly Arranged
 thus enabling it to stand  for the o lderNet pbm  f orma ts,as well as tob e ex tended to new uses, e. g., t ra n spar e nc y.

P AM is s u pp o r ted  b yXnV ie w  a nd FF mpe g. As s pecified t heTU PLTYPE is op t io nal; howev er,  FFmpeg requ ire s it.
D iff e rence s f rom t he old e r form ats 
Thehe a der fo r  the PA M fi le f ormat begins with P7 ,  and (unlike i n theot h er f orm ats ) ends inan  expl i cit clo s e: E N DHD R . Line ends i n a PAM hea d erare si gn ifi c ant; f or PN M, lin e ends arewhit e space.
There is no p l ain (hu man-re ada ble , AS C II -b ase d) ver s io n o f  PA M. PAM f il es  arealwa y s b inar y,andattem pts to use th e s witc h  -p lainwithNetp bm  prog rams t hat p ro duce PAM output  res ults in a n e rr orme ssage . 

Forthe  bl ack-and -whitev ers io n o fPAM (depth 1, tupl et y pe  BLACKAN DWHITE ) ,co r respondi ng  to  PBM , PAM u seso ne  byte pe r pixe l ,in stead o fPBM'sus e o f o ne bi t  per  pixel  (packin g eig h t pixels in on e  byte). Also, th e va l ue 1  in  such a PAM  ima g e st ands fo r w h ite ( “ligh to n” ) , as opposed to bla ck  in PB M (“i nk on”).

Tra nsparencyA l l of the  bas i ct uple types (BL ACKAN DWHITE, GR A YSCALE,and R GB) have  a varian t with anopa cit y c han n e l.   The tuple t y p e is  c reatedbyappendi ng"_A LPH A"as  a suffix  to theba se  t up letype. 
For exa mp le,  a n i magew ith atuple  typ eof GRA YSCALEi se q uiva le nt  toPGM  ( porta bleg ray map). G RAYSCALE_ ALP H A wi th  t ranspar ency is not d ir ectly poss ib lein PGM . The spec ification permits MAXVA L  1 forGRA YSCAL E, b ut it wou ldhave t hes ame ef fect a s BLA CK AND W H ITE.A nexa mp le in theB M P a rticl eshow s an RG BA image with 4×2= 8  bl ue, green, re d,andw h it e p i xe l s;ha l f t r a nsparent (0x7F)  in the fi rs t  l ower row,o paq ue  (0xFF)  in the  seco n d upper  row; hex . FF00007 F00FF 0 0 7F0000FF7F F FFFFF7FFF0000FF0 0FF00 F F0000F FFF  FFFFF FF F i n BGR A orde r . F or PA M, thi sbitmap  hasto  be give n in RGBA order, swappi ng the  1stand  3rd byte  in eac h pixel.BMProws are t ypi cal ly ar ran g ed
 thus_enabling it_to stand for the_older Netpbm_formats,_as well_as_to be extended_to new uses,_e.g., transparency.

PAM is supported_by XnView and_FFmpeg._As specified the TUPLTYPE is optional; however, FFmpeg requires it.

Differences from the older formats_
The_header for_the_PAM_file format begins with P7,_and (unlike in the other_formats) ends_in an explicit close: ENDHDR. Line ends in_a_PAM header are_significant; for PNM, line ends are white space.

There is_no plain (human-readable, ASCII-based) version of_PAM. PAM files_are_always_binary, and attempts to_use the switch -plain with Netpbm_programs that produce PAM output results_in an error message.

For the black-and-white version_of PAM (depth 1, tuple type_BLACKANDWHITE), corresponding to PBM, PAM_uses one_byte per pixel, instead of_PBM's use of_one bit_per pixel (packing_eight pixels in one byte). Also,_the value 1_in such a PAM image stands_for_white (“light on”),_as_opposed_to black_in PBM (“ink_on”).

Transparency_
All of_the_basic tuple types (BLACKANDWHITE, GRAYSCALE, and_RGB)_have a variant with an opacity channel._ The tuple type_is_created by appending "_ALPHA"_as a suffix to the_base tuple type.

For example, an image_with a_tuple type_of GRAYSCALE is equivalent to PGM (portable graymap). GRAYSCALE_ALPHA with transparency_is not directly possible in PGM._The specification permits MAXVAL_1 for_GRAYSCALE,_but it would_have_the same_effect as BLACKANDWHITE.

An example in the BMP_article shows_an RGBA image with 4×2=8 blue,_green, red, and white_pixels;_half transparent (0x7F) in the first_lower row, opaque (0xFF) in the_second upper row; hex. FF00007F_00FF007F_0000FF7F_FFFFFF7F FF0000FF 00FF00FF 0000FFFF FFFFFFFF_in BGRA order. For PAM, this_bitmap has to_be given in RGBA order, swapping the_1st_and 3rd byte in each pixel._BMP_rows are typically arranged