%!PS-Adobe-2.0 %%Version: 0.1 %%DocumentFonts: (atend) %%Pages: (atend) %%EndComments % % Version 3.3.2 prologue for troff files. % /#copies 1 store /aspectratio 1 def /formsperpage 1 def /landscape false def /linewidth .3 def /magnification 1 def /margin 0 def /orientation 0 def /resolution 720 def /rotation 1 def /xoffset 0 def /yoffset 0 def /roundpage true def /useclippath true def /pagebbox [0 0 612 792] def /R /Times-Roman def /I /Times-Italic def /B /Times-Bold def /BI /Times-BoldItalic def /H /Helvetica def /HI /Helvetica-Oblique def /HB /Helvetica-Bold def /HX /Helvetica-BoldOblique def /CW /Courier def /CO /Courier def /CI /Courier-Oblique def /CB /Courier-Bold def /CX /Courier-BoldOblique def /PA /Palatino-Roman def /PI /Palatino-Italic def /PB /Palatino-Bold def /PX /Palatino-BoldItalic def /Hr /Helvetica-Narrow def /Hi /Helvetica-Narrow-Oblique def /Hb /Helvetica-Narrow-Bold def /Hx /Helvetica-Narrow-BoldOblique def /KR /Bookman-Light def /KI /Bookman-LightItalic def /KB /Bookman-Demi def /KX /Bookman-DemiItalic def /AR /AvantGarde-Book def /AI /AvantGarde-BookOblique def /AB /AvantGarde-Demi def /AX /AvantGarde-DemiOblique def /NR /NewCenturySchlbk-Roman def /NI /NewCenturySchlbk-Italic def /NB /NewCenturySchlbk-Bold def /NX /NewCenturySchlbk-BoldItalic def /ZD /ZapfDingbats def /ZI /ZapfChancery-MediumItalic def /S /S def /S1 /S1 def /GR /Symbol def /inch {72 mul} bind def /min {2 copy gt {exch} if pop} bind def /setup { counttomark 2 idiv {def} repeat pop landscape {/orientation 90 orientation add def} if /scaling 72 resolution div def linewidth setlinewidth 1 setlinecap pagedimensions xcenter ycenter translate orientation rotation mul rotate width 2 div neg height 2 div translate xoffset inch yoffset inch neg translate margin 2 div dup neg translate magnification dup aspectratio mul scale scaling scaling scale addmetrics 0 0 moveto } def /pagedimensions { useclippath userdict /gotpagebbox known not and { /pagebbox [clippath pathbbox newpath] def roundpage currentdict /roundpagebbox known and {roundpagebbox} if } if pagebbox aload pop 4 -1 roll exch 4 1 roll 4 copy landscape {4 2 roll} if sub /width exch def sub /height exch def add 2 div /xcenter exch def add 2 div /ycenter exch def userdict /gotpagebbox true put } def /addmetrics { /Symbol /S null Sdefs cf /Times-Roman /S1 StandardEncoding dup length array copy S1defs cf } def /pagesetup { /page exch def currentdict /pagedict known currentdict page known and { page load pagedict exch get cvx exec } if } def /decodingdefs [ {counttomark 2 idiv {y moveto show} repeat} {neg /y exch def counttomark 2 idiv {y moveto show} repeat} {neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat} {neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat} {counttomark 2 idiv {y moveto show} repeat} {neg setfunnytext} ] def /setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def /w {neg moveto show} bind def /m {neg dup /y exch def moveto} bind def /done {/lastpage where {pop lastpage} if} def /f { dup /font exch def findfont exch dup /ptsize exch def scaling div dup /size exch def scalefont setfont linewidth ptsize mul scaling 10 mul div setlinewidth /spacewidth ( ) stringwidth pop def } bind def /changefont { /fontheight exch def /fontslant exch def currentfont [ 1 0 fontheight ptsize div fontslant sin mul fontslant cos div fontheight ptsize div 0 0 ] makefont setfont } bind def /sf {f} bind def /cf { dup length 2 idiv /entries exch def /chtab exch def /newencoding exch def /newfont exch def findfont dup length 1 add dict /newdict exch def {1 index /FID ne {newdict 3 1 roll put}{pop pop} ifelse} forall newencoding type /arraytype eq {newdict /Encoding newencoding put} if newdict /Metrics entries dict put newdict /Metrics get begin chtab aload pop 1 1 entries {pop def} for newfont newdict definefont pop end } bind def % % A few arrays used to adjust reference points and character widths in some % of the printer resident fonts. If square roots are too high try changing % the lines describing /radical and /radicalex to, % % /radical [0 -75 550 0] % /radicalex [-50 -75 500 0] % % Move braceleftbt a bit - default PostScript character is off a bit. % /Sdefs [ /bracketlefttp [201 500] /bracketleftbt [201 500] /bracketrighttp [-81 380] /bracketrightbt [-83 380] /braceleftbt [203 490] /bracketrightex [220 -125 500 0] /radical [0 0 550 0] /radicalex [-50 0 500 0] /parenleftex [-20 -170 0 0] /integral [100 -50 500 0] /infinity [10 -75 730 0] ] def /S1defs [ /underscore [0 80 500 0] /endash [7 90 650 0] ] def % % Tries to round clipping path dimensions, as stored in array pagebbox, so they % match one of the known sizes in the papersizes array. Lower left coordinates % are always set to 0. % /roundpagebbox { 7 dict begin /papersizes [8.5 inch 11 inch 14 inch 17 inch] def /mappapersize { /val exch def /slop .5 inch def /diff slop def /j 0 def 0 1 papersizes length 1 sub { /i exch def papersizes i get val sub abs dup diff le {/diff exch def /j i def} {pop} ifelse } for diff slop lt {papersizes j get} {val} ifelse } def pagebbox 0 0 put pagebbox 1 0 put pagebbox dup 2 get mappapersize 2 exch put pagebbox dup 3 get mappapersize 3 exch put end } bind def %%EndProlog %%BeginSetup mark % % Encoding vector and redefinition of findfont for the ISO Latin1 standard. % The 18 characters missing from ROM based fonts on older printers are noted % below. % /ISOLatin1Encoding [ /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /space /exclam /quotedbl /numbersign /dollar /percent /ampersand /quoteright /parenleft /parenright /asterisk /plus /comma /minus /period /slash /zero /one /two /three /four /five /six /seven /eight /nine /colon /semicolon /less /equal /greater /question /at /A /B /C /D /E /F /G /H /I /J /K /L /M /N /O /P /Q /R /S /T /U /V /W /X /Y /Z /bracketleft /backslash /bracketright /asciicircum /underscore /quoteleft /a /b /c /d /e /f /g /h /i /j /k /l /m /n /o /p /q /r /s /t /u /v /w /x /y /z /braceleft /bar /braceright /asciitilde /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /.notdef /dotlessi /grave /acute /circumflex /tilde /macron /breve /dotaccent /dieresis /.notdef /ring /cedilla /.notdef /hungarumlaut /ogonek /caron /space /exclamdown /cent /sterling /currency /yen /brokenbar % missing /section /dieresis /copyright /ordfeminine /guillemotleft /logicalnot /hyphen /registered /macron /degree % missing /plusminus % missing /twosuperior % missing /threesuperior % missing /acute /mu % missing /paragraph /periodcentered /cedilla /onesuperior % missing /ordmasculine /guillemotright /onequarter % missing /onehalf % missing /threequarters % missing /questiondown /Agrave /Aacute /Acircumflex /Atilde /Adieresis /Aring /AE /Ccedilla /Egrave /Eacute /Ecircumflex /Edieresis /Igrave /Iacute /Icircumflex /Idieresis /Eth % missing /Ntilde /Ograve /Oacute /Ocircumflex /Otilde /Odieresis /multiply % missing /Oslash /Ugrave /Uacute /Ucircumflex /Udieresis /Yacute % missing /Thorn % missing /germandbls /agrave /aacute /acircumflex /atilde /adieresis /aring /ae /ccedilla /egrave /eacute /ecircumflex /edieresis /igrave /iacute /icircumflex /idieresis /eth % missing /ntilde /ograve /oacute /ocircumflex /otilde /odieresis /divide % missing /oslash /ugrave /uacute /ucircumflex /udieresis /yacute % missing /thorn % missing /ydieresis ] def /NewFontDirectory FontDirectory maxlength dict def % % Apparently no guarantee findfont is defined in systemdict so the obvious % % systemdict /findfont get exec % % can generate an error. So far the only exception is a VT600 (version 48.0). % userdict /@RealFindfont known not { userdict begin /@RealFindfont systemdict begin /findfont load end def end } if /findfont { dup NewFontDirectory exch known not { dup %dup systemdict /findfont get exec % not always in systemdict dup userdict /@RealFindfont get exec dup /Encoding get StandardEncoding eq { dup length dict begin {1 index /FID ne {def}{pop pop} ifelse} forall /Encoding ISOLatin1Encoding def currentdict end /DummyFontName exch definefont } if NewFontDirectory 3 1 roll put } if NewFontDirectory exch get } bind def setup %%EndSetup %%Page: 1 1 /saveobj save def mark 1 pagesetup 12 /Times-Bold f (Libnetpbm) 1913 1230 w (Image) 2518 1230 w (Processing Manual) 2868 1230 w 10 /Times-Bold f (Libnetpbm Image Processing Manual) 720 1920 w 10 /Times-Roman f (Updated: December 2003) 720 2076 w (Table) 720 2232 w (Of) 997 2232 w (Contents) 1152 2232 w () 2643 2232 w ( ) 720 2352 w (This) 720 2508 w (reference) 928 2508 w (manual) 1327 2508 w (covers) 1651 2508 w (functions) 1941 2508 w (in) 2343 2508 w (the) 2452 2508 w 10 /Times-Bold f (libnetpbm) 2605 2508 w 10 /Times-Roman f (library) 3076 2508 w (for) 3373 2508 w (processing) 3520 2508 w (images,) 3978 2508 w (using) 4317 2508 w (the) 4565 2508 w (Netpbm) 4718 2508 w (image formats and the) 720 2628 w 10 /Times-Bold f (libnetpbm) 1635 2628 w 10 /Times-Roman f (in\255memory image formats.) 2100 2628 w (For) 720 2784 w (historical) 890 2784 w (reasons) 1293 2784 w (as) 1623 2784 w (well) 1737 2784 w (as) 1940 2784 w (to) 2054 2784 w (avoid) 2163 2784 w (clutter,) 2416 2784 w (it) 2727 2784 w (does) 2815 2784 w (not) 3030 2784 w (cover) 3190 2784 w (the) 3443 2784 w (largely) 3597 2784 w (obsolete) 3906 2784 w (PBM,) 4271 2784 w (PGM,) 4540 2784 w (PPM,) 4814 2784 w (and) 720 2904 w (PNM) 895 2904 w (classes) 1143 2904 w (of) 1451 2904 w 10 /Times-Bold f (libnetpbm) 1565 2904 w 10 /Times-Roman f (functions.) 2036 2904 w (For) 2489 2904 w (those,) 2659 2904 w (see) 2926 2904 w (PBM) 3084 2904 w (Function) 3327 2904 w (Manual,) 3714 2904 w (PGM) 4075 2904 w (Function) 4323 2904 w (Manual,) 4710 2904 w (PPM) 720 3024 w (Function) 951 3024 w (Manual,) 1337 3024 w (and) 1697 3024 w (PNM) 1871 3024 w (Function) 2118 3024 w (Manual.) 2505 3024 w (Note) 2891 3024 w (that) 3116 3024 w (you) 3297 3024 w (do) 3478 3024 w (not) 3609 3024 w (need) 3768 3024 w (those) 3987 3024 w (functions) 4229 3024 w (to) 4632 3024 w (process) 4741 3024 w (PBM, PGM, PPM, and PNM images.) 720 3144 w (The functions in this manual are sufficient for that.) 2269 3144 w (The PPM Drawing function are covered separately in PPM Drawing Function Manual.) 720 3300 w (For introductory and general information using) 720 3456 w 10 /Times-Bold f (libnetpbm) 2629 3456 w 10 /Times-Roman f (, see Libnetpbm User's Guide.) 3069 3456 w 10 /Times-Bold f (libnetpbm) 720 3612 w 10 /Times-Roman f (also) 1195 3612 w (contains) 1391 3612 w (functions) 1759 3612 w (that) 2166 3612 w (are) 2351 3612 w (not) 2507 3612 w (specifically) 2670 3612 w (oriented) 3165 3612 w (toward) 3527 3612 w (processing) 3840 3612 w (image) 4303 3612 w (data.) 4583 3612 w (Read) 4835 3612 w (about those in the Libnetpbm Utility Manual.) 720 3732 w (To use these services, #include) 720 3888 w 10 /Times-Bold f (pam.h) 1984 3888 w 10 /Times-Roman f (.) 2254 3888 w 10 /Times-Bold f (Types) 720 4128 w 10 /Times-Roman f (Here are some important types that you use with) 720 4320 w 10 /Times-Bold f (libnetpbm) 2681 4320 w 10 /Times-Roman f (:) 3121 4320 w (sampleA sample of a Netpbm image.) 970 4476 w (See the format) 2501 4476 w (specifications) 3109 4476 w (\255\255) 3684 4476 w (as) 3776 4476 w (an) 3885 4476 w (example,) 4005 4476 w (the) 4394 4476 w (red) 4542 4476 w (intensity) 4695 4476 w (of a particular pixel of a PPM image is a sample.) 1220 4596 w (This is an integer type.) 3220 4596 w (tuple) 970 4752 w (A) 1220 4752 w (tuple) 1328 4752 w (from) 1564 4752 w (a) 1794 4752 w (PAM) 1874 4752 w (image) 2127 4752 w (or) 2408 4752 w (the) 2528 4752 w (PAM) 2687 4752 w (equivalent) 2941 4752 w (of) 3394 4752 w (a) 3514 4752 w (PNM) 3595 4752 w (image.) 3849 4752 w (See) 4180 4752 w (the) 4361 4752 w (PAM) 4520 4752 w (format) 4774 4752 w (specification) 1220 4872 w (\255\255) 1757 4872 w (as) 1850 4872 w (an) 1960 4872 w (example,) 2081 4872 w (a) 2471 4872 w (pixel) 2542 4872 w (of) 2769 4872 w (a) 2879 4872 w (PPM) 2950 4872 w (image) 3178 4872 w (would) 3448 4872 w (be) 3724 4872 w (a) 3844 4872 w (tuple.) 3914 4872 w (A) 4190 4872 w (tuple) 4288 4872 w (is) 4514 4872 w (an) 4607 4872 w (array) 4727 4872 w (of) 4957 4872 w (samples.) 1220 4992 w (samplenSame) 970 5148 w (as) 1552 5148 w 10 /Times-Bold f (sample) 1662 5148 w 10 /Times-Roman f (,) 1962 5148 w (except) 2014 5148 w (in) 2301 5148 w (normalized) 2406 5148 w (form.) 2882 5148 w (This) 3153 5148 w (is) 3358 5148 w (a) 3452 5148 w (floating) 3523 5148 w (point) 3861 5148 w (type) 4094 5148 w (with) 4293 5148 w (a) 4498 5148 w (value) 4569 5148 w (in) 4812 5148 w (the) 4918 5148 w (range) 1220 5268 w (0..1.) 1474 5268 w (0) 1707 5268 w (corresponds) 1790 5268 w (to) 2305 5268 w (a) 2416 5268 w (PAM/PNM) 2492 5268 w (sample) 2986 5268 w (value) 3301 5268 w (of) 3549 5268 w (0.) 3664 5268 w (1) 3796 5268 w (corresponds) 3878 5268 w (to) 4392 5268 w (a) 4502 5268 w (PAM/PNM) 4578 5268 w (sample value equal to the image's maxval.) 1220 5388 w (tuplenThe) 970 5544 w (same) 1405 5544 w (as) 1640 5544 w 10 /Times-Bold f (tuple) 1753 5544 w 10 /Times-Roman f (,) 1970 5544 w (except) 2025 5544 w (composed) 2315 5544 w (of) 2750 5544 w (normalized) 2863 5544 w (samples) 3342 5544 w (\() 3694 5544 w 10 /Times-Bold f (samplen) 3727 5544 w 10 /Times-Roman f (\)) 4083 5544 w (intead) 4146 5544 w (of) 4420 5544 w (regular) 4533 5544 w (sam\255) 4846 5544 w (ples \() 1220 5664 w 10 /Times-Bold f (sample) 1439 5664 w 10 /Times-Roman f (\).) 1739 5664 w (The main argument to most of the PAM functions is the address of a) 720 5820 w 10 /Times-Bold f (pam) 3484 5820 w 10 /Times-Roman f (structure,) 3699 5820 w (which) 4099 5820 w (is) 4369 5820 w (defined) 4462 5820 w (as) 4787 5820 w (fol\255) 4896 5820 w (lows:) 720 5940 w 10 /Times-Bold f (struct pam {) 720 6096 w (int) 720 6216 w 10 /Times-Italic f (size) 862 6216 w 10 /Times-Bold f (int) 720 6336 w 10 /Times-Italic f (len) 862 6336 w 10 /Times-Bold f (FILE *) 720 6456 w 10 /Times-Italic f (file) 1029 6456 w 10 /Times-Bold f (int) 720 6576 w 10 /Times-Italic f (format) 862 6576 w 10 /Times-Bold f (int) 720 6696 w 10 /Times-Italic f (plainformat) 862 6696 w 10 /Times-Bold f (int) 720 6816 w 10 /Times-Italic f (height) 862 6816 w 10 /Times-Bold f (int) 720 6936 w 10 /Times-Italic f (width) 862 6936 w 10 /Times-Bold f (int) 720 7056 w 10 /Times-Italic f (depth) 862 7056 w 10 /Times-Bold f (sample) 720 7176 w 10 /Times-Italic f (maxval) 1045 7176 w 10 /Times-Bold f (int) 720 7296 w 10 /Times-Italic f (bytes) 862 7296 w 10 /S f (_) 1067 7296 w 10 /Times-Italic f (per) 1117 7296 w 10 /S f (_) 1250 7296 w 10 /Times-Italic f (sample) 1300 7296 w cleartomark showpage saveobj restore %%EndPage: 1 1 %%Page: 2 2 /saveobj save def mark 2 pagesetup 10 /Times-Roman f (\255 2 \255) 2797 480 w 10 /Times-Bold f (char) 720 840 w 10 /Times-Italic f (tuple) 939 840 w 10 /S f (_) 1139 840 w 10 /Times-Italic f (type) 1189 840 w 10 /Times-Bold f ([256]; }) 1355 840 w 10 /Times-Roman f (See The Libnetbm User's Guide for information on the) 720 996 w 10 /Times-Bold f (pam) 2947 996 w 10 /Times-Roman f (structure.) 3161 996 w 10 /Times-Bold f (Macros) 720 1236 w (PNM) 720 1392 w 10 /S f (_) 947 1392 w 10 /Times-Bold f (MAXMAXVAL) 997 1392 w 10 /Times-Roman f (is) 1716 1392 w (the) 1815 1392 w (maximum) 1969 1392 w (maxval) 2407 1392 w (that) 2733 1392 w (Netpbm) 2916 1392 w (images) 3271 1392 w (could) 3587 1392 w (historically) 3842 1392 w (have:) 4325 1392 w (255.) 4574 1392 w (Many) 4807 1392 w (programs) 720 1512 w (aren't) 1123 1512 w (capable) 1381 1512 w (of handling Netpbm images with a maxval larger than this.) 1711 1512 w (It's named this way for) 4114 1512 w (backward compatibility \255\255 it had this name back when it was the maximum maxval.) 720 1632 w 10 /Times-Bold f (PNM) 720 1788 w 10 /S f (_) 947 1788 w 10 /Times-Bold f (OVERALLMAXVAL) 997 1788 w 10 /Times-Roman f (is the maximum maxval that Netpbm images can have today \(65535\).) 1966 1788 w 10 /Times-Bold f (PBM) 720 1944 w 10 /S f (_) 942 1944 w 10 /Times-Bold f (FORMAT) 992 1944 w 10 /Times-Roman f (,) 1436 1944 w 10 /Times-Bold f (RPBM) 1574 1944 w 10 /S f (_) 1868 1944 w 10 /Times-Bold f (FORMAT) 1918 1944 w 10 /Times-Roman f (,) 2362 1944 w 10 /Times-Bold f (PGM) 2501 1944 w 10 /S f (_) 2734 1944 w 10 /Times-Bold f (FORMAT) 2784 1944 w 10 /Times-Roman f (,) 3228 1944 w 10 /Times-Bold f (RPGM) 3367 1944 w 10 /S f (_) 3672 1944 w 10 /Times-Bold f (FORMAT) 3722 1944 w 10 /Times-Roman f (,) 4166 1944 w 10 /Times-Bold f (PPM) 4305 1944 w 10 /S f (_) 4521 1944 w 10 /Times-Bold f (FORMAT) 4571 1944 w 10 /Times-Roman f (,) 5015 1944 w 10 /Times-Bold f (RPPM) 720 2064 w 10 /S f (_) 1008 2064 w 10 /Times-Bold f (FORMAT) 1058 2064 w 10 /Times-Roman f (,) 1502 2064 w (and) 1597 2064 w 10 /Times-Bold f (PAM) 1811 2064 w 10 /S f (_) 2038 2064 w 10 /Times-Bold f (FORMAT) 2088 2064 w 10 /Times-Roman f (are) 2601 2064 w (the) 2791 2064 w (format) 2982 2064 w (codes) 3317 2064 w (of) 3613 2064 w (the) 3765 2064 w (various) 3956 2064 w (Netpbm) 4319 2064 w (formats.) 4710 2064 w 10 /Times-Bold f (RPBM) 720 2184 w 10 /S f (_) 1014 2184 w 10 /Times-Bold f (FORMAT) 1064 2184 w 10 /Times-Roman f (is) 1535 2184 w (the) 1629 2184 w (raw) 1778 2184 w (PBM) 1954 2184 w (format) 2193 2184 w (and) 2486 2184 w 10 /Times-Bold f (PBM) 2657 2184 w 10 /S f (_) 2879 2184 w 10 /Times-Bold f (FORMAT) 2929 2184 w 10 /Times-Roman f (is) 3400 2184 w (the) 3494 2184 w (plain) 3643 2184 w (PBM) 3870 2184 w (format,) 4110 2184 w (and) 4429 2184 w (so) 4601 2184 w (on.) 4718 2184 w (See) 4896 2184 w (the) 720 2304 w 10 /Times-Italic f (format) 867 2304 w 10 /Times-Roman f (member of the) 1159 2304 w 10 /Times-Bold f (pam) 1766 2304 w 10 /Times-Roman f (structure.) 1980 2304 w 10 /Times-Bold f (PAM) 720 2460 w 10 /S f (_) 947 2460 w 10 /Times-Bold f (FORMAT) 997 2460 w 10 /S f (_) 1441 2460 w 10 /Times-Bold f (TYPE\() 1491 2460 w 10 /Times-Italic f (format) 1791 2460 w 10 /Times-Bold f (\)) 2058 2460 w 10 /Times-Roman f (gives) 2121 2460 w (the) 2362 2460 w (type) 2514 2460 w (of) 2716 2460 w (a) 2829 2460 w (format,) 2903 2460 w (given) 3224 2460 w (the) 3476 2460 w (format) 3628 2460 w (code.) 3924 2460 w (The) 4193 2460 w (types) 4379 2460 w (of) 4621 2460 w (formats) 4735 2460 w (are) 720 2580 w (PBM,) 904 2580 w (PGM,) 1204 2580 w (PPM,) 1509 2580 w (and) 1798 2580 w (PAM) 2005 2580 w (and) 2285 2580 w (macros) 2491 2580 w (for) 2841 2580 w (the) 3019 2580 w (type) 3203 2580 w (codes) 3437 2580 w (are,) 3726 2580 w (respectively,) 3934 2580 w (PBM) 4503 2580 w 10 /S f (_) 4715 2580 w 10 /Times-Roman f (TYPE,) 4765 2580 w (PGM) 720 2700 w 10 /S f (_) 937 2700 w 10 /Times-Roman f (TYPE,) 987 2700 w (PPM) 1292 2700 w 10 /S f (_) 1493 2700 w 10 /Times-Roman f (TYPE,) 1543 2700 w (and) 1848 2700 w (PAM) 2022 2700 w 10 /S f (_) 2239 2700 w 10 /Times-Roman f (TYPE.) 2289 2700 w (Note) 2619 2700 w (that) 2843 2700 w (there) 3023 2700 w (are) 3252 2700 w (more) 3403 2700 w (format) 3638 2700 w (codes) 3934 2700 w (then) 4191 2700 w (there) 4393 2700 w (are) 4622 2700 w (format) 4774 2700 w (types because there are different format codes for the plain and raw subformats of each format.) 720 2820 w 10 /Times-Bold f (Functions) 720 3060 w 10 /Times-Roman f (These interfaces are declared in) 720 3252 w 10 /Times-Bold f (pam.h) 2006 3252 w 10 /Times-Roman f (.) 2276 3252 w 10 /Times-Bold f (Memory Management) 720 3492 w (Synopsis) 720 3768 w (tuple ** pnm) 720 3960 w 10 /S f (_) 1282 3960 w 10 /Times-Bold f (allocpamarray\( struct pam *) 1332 3960 w 10 /Times-Italic f (pamP) 2555 3960 w 10 /Times-Bold f (\);) 2788 3960 w (tuple * pnm) 720 4116 w 10 /S f (_) 1232 4116 w 10 /Times-Bold f (allocpamrow\( struct pam *) 1282 4116 w 10 /Times-Italic f (pamP) 2433 4116 w 10 /Times-Bold f (\);) 2666 4116 w (void pnm) 720 4272 w 10 /S f (_) 1124 4272 w 10 /Times-Bold f (freepamarray\( tuple **) 1174 4272 w 10 /Times-Italic f (tuplearray) 2166 4272 w 10 /Times-Bold f (, struct pam *) 2588 4272 w 10 /Times-Italic f (pamP) 3176 4272 w 10 /Times-Bold f (\);) 3409 4272 w (void pnm) 720 4428 w 10 /S f (_) 1124 4428 w 10 /Times-Bold f (freepamrow\( tuple *) 1174 4428 w 10 /Times-Italic f (tuplerow) 2044 4428 w 10 /Times-Bold f (\);) 2400 4428 w (tuple * allocpamtuple\( struct pam *) 720 4584 w 10 /Times-Italic f (pamP) 2239 4584 w 10 /Times-Bold f (\);) 2472 4584 w (void pnm) 720 4740 w 10 /S f (_) 1124 4740 w 10 /Times-Bold f (freepamtuple\( tuple) 1174 4740 w 10 /Times-Italic f (tuple) 2045 4740 w 10 /Times-Bold f (\);) 2270 4740 w (tuplen * pnm) 720 4896 w 10 /S f (_) 1288 4896 w 10 /Times-Bold f (allocpamrown\( struct pam *) 1338 4896 w 10 /Times-Italic f (pamP) 2545 4896 w 10 /Times-Bold f (\);) 2778 4896 w (void pnm) 720 5052 w 10 /S f (_) 1124 5052 w 10 /Times-Bold f (freepamrown\( tuple *) 1174 5052 w 10 /Times-Italic f (tuplenrow) 2100 5052 w 10 /Times-Bold f (\);) 2506 5052 w (Description) 720 5292 w (pnm) 720 5484 w 10 /S f (_) 915 5484 w 10 /Times-Bold f (allocpamarray\(\)) 965 5484 w 10 /Times-Roman f (allocates) 1692 5484 w (space) 2075 5484 w (for) 2330 5484 w (an) 2480 5484 w (array) 2608 5484 w (of) 2846 5484 w (tuples.) 2963 5484 w 10 /Times-Bold f (pnm) 3286 5484 w 10 /S f (_) 3481 5484 w 10 /Times-Bold f (freepamarray\(\)) 3531 5484 w 10 /Times-Roman f (frees) 4223 5484 w (an) 4451 5484 w (array) 4580 5484 w (space) 4819 5484 w (allocated by) 720 5604 w 10 /Times-Bold f (pnm) 1230 5604 w 10 /S f (_) 1425 5604 w 10 /Times-Bold f (allocpamarray\(\)) 1475 5604 w 10 /Times-Roman f (or) 2193 5604 w 10 /Times-Bold f (pnm) 2301 5604 w 10 /S f (_) 2496 5604 w 10 /Times-Bold f (readpam\(\)) 2546 5604 w 10 /Times-Roman f (.) 2995 5604 w 10 /Times-Bold f (pnm) 720 5760 w 10 /S f (_) 915 5760 w 10 /Times-Bold f (allocpamrow\(\)) 965 5760 w 10 /Times-Roman f (allocates) 1638 5760 w (space) 2014 5760 w (for) 2262 5760 w (a) 2405 5760 w (row) 2476 5760 w (of) 2658 5760 w (a) 2768 5760 w (PAM) 2839 5760 w (image,) 3083 5760 w (in) 3379 5760 w (basic) 3484 5760 w (form.) 3716 5760 w 10 /Times-Bold f (pnm) 3988 5760 w 10 /S f (_) 4183 5760 w 10 /Times-Bold f (freepamrow\(\)) 4233 5760 w 10 /Times-Roman f (frees) 4847 5760 w (it.) 720 5880 w 10 /Times-Bold f (pnm) 720 6036 w 10 /S f (_) 915 6036 w 10 /Times-Bold f (allocpamrown\(\)) 965 6036 w 10 /Times-Roman f (is) 1669 6036 w (the) 1763 6036 w (same) 1912 6036 w (as) 2144 6036 w 10 /Times-Bold f (pnm) 2254 6036 w 10 /S f (_) 2449 6036 w 10 /Times-Bold f (allocpamrow\(\)) 2499 6036 w 10 /Times-Roman f (except) 3147 6036 w (that) 3434 6036 w (it) 3611 6036 w (allocates) 3694 6036 w (space) 4070 6036 w (for) 4318 6036 w (a) 4462 6036 w (PAM) 4534 6036 w (row) 4779 6036 w (in) 4962 6036 w (the normalized form.) 720 6156 w 10 /Times-Bold f (pnm) 1610 6156 w 10 /S f (_) 1805 6156 w 10 /Times-Bold f (freepamrown\(\)) 1855 6156 w 10 /Times-Roman f (is similarly like) 2522 6156 w 10 /Times-Bold f (pnm) 3170 6156 w 10 /S f (_) 3365 6156 w 10 /Times-Bold f (freepamrow) 3415 6156 w 10 /Times-Roman f (.) 3935 6156 w 10 /Times-Bold f (Reading Netpbm Files) 720 6396 w (Synopsis) 720 6672 w (void pnm) 720 6864 w 10 /S f (_) 1124 6864 w 10 /Times-Bold f (readpaminit\( FILE *) 1174 6864 w 10 /Times-Italic f (file) 2069 6864 w 10 /Times-Bold f (, struct pam *) 2197 6864 w 10 /Times-Italic f (pamP) 2785 6864 w 10 /Times-Bold f (, int) 3018 6864 w 10 /Times-Italic f (size) 3210 6864 w 10 /Times-Bold f (\);) 3360 6864 w (void pnm) 720 7020 w 10 /S f (_) 1124 7020 w 10 /Times-Bold f (readpamrow\( struct pam *) 1174 7020 w 10 /Times-Italic f (pamP) 2319 7020 w 10 /Times-Bold f (, tuple *) 2552 7020 w 10 /Times-Italic f (tuplerow) 2894 7020 w 10 /Times-Bold f (\);) 3250 7020 w (tuple ** pnm) 720 7176 w 10 /S f (_) 1282 7176 w 10 /Times-Bold f (readpam\( FILE *) 1332 7176 w 10 /Times-Italic f (file) 2082 7176 w 10 /Times-Bold f (, struct pam *) 2210 7176 w 10 /Times-Italic f (pamP) 2798 7176 w 10 /Times-Bold f (,) 3031 7176 w (int) 720 7296 w 10 /Times-Italic f (size) 862 7296 w 10 /Times-Bold f (\);) 1012 7296 w cleartomark showpage saveobj restore %%EndPage: 2 2 %%Page: 3 3 /saveobj save def mark 3 pagesetup 10 /Times-Roman f (\255 3 \255) 2797 480 w 10 /Times-Bold f (void pnm) 720 840 w 10 /S f (_) 1124 840 w 10 /Times-Bold f (readpamrown\( struct pam *) 1174 840 w 10 /Times-Italic f (pamP) 2375 840 w 10 /Times-Bold f (, tuplen *) 2608 840 w 10 /Times-Italic f (tuplenrow) 3006 840 w 10 /Times-Bold f (\);) 3412 840 w (Description) 720 1080 w (pnm) 720 1272 w 10 /S f (_) 915 1272 w 10 /Times-Bold f (readpaminit\(\)) 965 1272 w 10 /Times-Roman f (reads the header of a Netpbm image.) 1584 1272 w (See above for a general description of the) 720 1428 w 10 /Times-Italic f (pamP) 2404 1428 w 10 /Times-Roman f (argument.) 2662 1428 w 10 /Times-Bold f (pnm) 720 1584 w 10 /S f (_) 915 1584 w 10 /Times-Bold f (readpaminit\(\)) 965 1584 w 10 /Times-Roman f (returns) 1594 1584 w (the) 1906 1584 w (information) 2063 1584 w (from) 2570 1584 w (the) 2799 1584 w (header) 2956 1584 w (in) 3256 1584 w (the) 3369 1584 w 10 /Times-Bold f (*) 3526 1584 w 10 /Times-Italic f (pamP) 3576 1584 w 10 /Times-Roman f (structure.) 3844 1584 w (It) 4278 1584 w (does) 4375 1584 w (not) 4594 1584 w (require) 4758 1584 w (any) 720 1704 w (members) 907 1704 w (of) 1316 1704 w 10 /Times-Bold f (*) 1441 1704 w 10 /Times-Italic f (pamP) 1491 1704 w 10 /Times-Roman f (through) 1766 1704 w 10 /Times-Bold f (tuple) 2119 1704 w 10 /S f (_) 2336 1704 w 10 /Times-Bold f (type) 2386 1704 w 10 /Times-Roman f (to) 2611 1704 w (be) 2731 1704 w (set) 2867 1704 w (at) 3020 1704 w (invocation,) 3134 1704 w (and) 3623 1704 w (sets) 3809 1704 w (all) 4001 1704 w (of) 4143 1704 w (those) 4268 1704 w (members.) 4521 1704 w (It) 4979 1704 w (expects all members after) 720 1824 w 10 /Times-Bold f (tuple) 1767 1824 w 10 /S f (_) 1984 1824 w 10 /Times-Bold f (type) 2034 1824 w 10 /Times-Roman f (to be meaningful.) 2242 1824 w 10 /Times-Italic f (size) 720 1980 w 10 /Times-Roman f (is) 942 1980 w (the) 1081 1980 w (size) 1275 1980 w (of) 1502 1980 w (the) 1657 1980 w 10 /Times-Bold f (*) 1851 1980 w 10 /Times-Italic f (pamP) 1901 1980 w 10 /Times-Roman f (structure) 2206 1980 w (as) 2627 1980 w (understood) 2782 1980 w (by) 3298 1980 w (the) 3470 1980 w (program) 3665 1980 w (processing) 4076 1980 w (the) 4576 1980 w (image.) 4771 1980 w 10 /Times-Bold f (pnm) 720 2100 w 10 /S f (_) 915 2100 w 10 /Times-Bold f (readpaminit\(\)) 965 2100 w 10 /Times-Roman f (does) 1587 2100 w (not) 1798 2100 w (attempt) 1954 2100 w (to) 2282 2100 w (use) 2387 2100 w (or) 2547 2100 w (set) 2657 2100 w (any) 2795 2100 w (members) 2966 2100 w (of) 3359 2100 w (the) 3469 2100 w (structure) 3618 2100 w (beyond) 3994 2100 w (that.) 4315 2100 w (The) 4542 2100 w (point) 4724 2100 w (of) 4957 2100 w (this) 720 2220 w (argument) 906 2220 w (is) 1324 2220 w (that) 1432 2220 w (the) 1623 2220 w (definition) 1786 2220 w (of) 2216 2220 w (the) 2340 2220 w (structure) 2503 2220 w (may) 2893 2220 w (change) 3106 2220 w (over) 3429 2220 w (time,) 3647 2220 w (with) 3892 2220 w (additional) 4112 2220 w (fields) 4554 2220 w (being) 4818 2220 w (added) 720 2340 w (to) 998 2340 w (the) 1116 2340 w (end.) 1278 2340 w (This) 1512 2340 w (argument) 1730 2340 w (allows) 2146 2340 w 10 /Times-Bold f (pnm) 2446 2340 w 10 /S f (_) 2641 2340 w 10 /Times-Bold f (readpaminit) 2691 2340 w 10 /Times-Roman f (to) 3258 2340 w (distinguish) 3375 2340 w (between) 3854 2340 w (a) 4225 2340 w (new) 4308 2340 w (program) 4513 2340 w (that) 4890 2340 w (wants) 720 2460 w (to) 981 2460 w (exploit) 1088 2460 w (the) 1395 2460 w (additional) 1546 2460 w (features) 1975 2460 w (and) 2319 2460 w (an) 2492 2460 w (old) 2615 2460 w (program) 2772 2460 w (that) 3139 2460 w (cannot) 3318 2460 w (\(or) 3613 2460 w (a) 3758 2460 w (new) 3831 2460 w (program) 4026 2460 w (that) 4393 2460 w (just) 4572 2460 w (doesn't) 4746 2460 w (want) 720 2580 w (to) 948 2580 w (deal) 1060 2580 w (with) 1260 2580 w (the) 1471 2580 w (added) 1626 2580 w (complexity\).) 1897 2580 w (At) 2463 2580 w (a) 2596 2580 w (minimum,) 2673 2580 w (this) 3121 2580 w (size) 3299 2580 w (must) 3487 2580 w (contain) 3715 2580 w (the) 4042 2580 w (members) 4197 2580 w (up) 4596 2580 w (through) 4729 2580 w 10 /Times-Bold f (tuple) 720 2700 w 10 /S f (_) 937 2700 w 10 /Times-Bold f (type) 987 2700 w 10 /Times-Roman f (.) 1170 2700 w (You) 1289 2700 w (should) 1530 2700 w (use) 1866 2700 w (the) 2068 2700 w 10 /Times-Bold f (PAM) 2259 2700 w 10 /S f (_) 2486 2700 w 10 /Times-Bold f (STRUCT) 2536 2700 w 10 /S f (_) 2942 2700 w 10 /Times-Bold f (SIZE) 2992 2700 w 10 /Times-Roman f (macro) 3290 2700 w (to) 3608 2700 w (compute) 3755 2700 w (this) 4168 2700 w (argument.) 4382 2700 w (E.g.) 4879 2700 w 10 /Times-Bold f (PAM) 720 2820 w 10 /S f (_) 947 2820 w 10 /Times-Bold f (STRUCT) 997 2820 w 10 /S f (_) 1403 2820 w 10 /Times-Bold f (SIZE\(tuple) 1453 2820 w 10 /S f (_) 1932 2820 w 10 /Times-Bold f (type\)) 1982 2820 w 10 /Times-Roman f (.) 2198 2820 w (The) 720 2976 w (function) 906 2976 w (expects) 1270 2976 w (to) 1600 2976 w (find) 1709 2976 w (the) 1901 2976 w (image) 2054 2976 w (file) 2329 2976 w (positioned) 2493 2976 w (to) 2941 2976 w (the) 3050 2976 w (start) 3203 2976 w (of) 3406 2976 w (the) 3520 2976 w (header) 3673 2976 w (and) 3969 2976 w (leaves) 4144 2976 w (it) 4425 2976 w (positioned) 4513 2976 w (to) 4962 2976 w (the start of the raster.) 720 3096 w 10 /Times-Bold f (pnm) 720 3252 w 10 /S f (_) 915 3252 w 10 /Times-Bold f (readpamrow\(\)) 965 3252 w 10 /Times-Roman f (reads) 1609 3252 w (a) 1848 3252 w (row) 1921 3252 w (of) 2105 3252 w (the) 2217 3252 w (raster) 2368 3252 w (from) 2618 3252 w (a) 2841 3252 w (Netpbm) 2914 3252 w (image) 3265 3252 w (file.) 3538 3252 w (It) 3750 3252 w (expects) 3840 3252 w (all) 4168 3252 w (of) 4297 3252 w (the) 4409 3252 w (members) 4561 3252 w (of) 4957 3252 w (the) 720 3372 w 10 /Times-Bold f (*pamP) 871 3372 w 10 /Times-Roman f (structure) 1200 3372 w (to) 1578 3372 w (be) 1685 3372 w (set) 1808 3372 w (upon) 1948 3372 w (invocation) 2177 3372 w (and) 2628 3372 w (does) 2801 3372 w (not) 3012 3372 w (modify) 3168 3372 w (any) 3485 3372 w (of) 3657 3372 w (them.) 3768 3372 w (It) 4046 3372 w (expects) 4135 3372 w (to) 4462 3372 w (find) 4568 3372 w (the) 4757 3372 w (file) 4907 3372 w (positioned) 720 3492 w (to) 1164 3492 w (the) 1269 3492 w (start) 1418 3492 w (of) 1617 3492 w (the) 1727 3492 w (row) 1876 3492 w (in) 2058 3492 w (question) 2163 3492 w (in) 2529 3492 w (the) 2634 3492 w (raster) 2783 3492 w (and) 3031 3492 w (leaves) 3202 3492 w (it) 3478 3492 w (positioned) 3562 3492 w (just) 4007 3492 w (after) 4180 3492 w (it.) 4390 3492 w (It) 4524 3492 w (returns) 4613 3492 w (the) 4918 3492 w (row) 720 3612 w (as) 902 3612 w (the) 1012 3612 w (array) 1161 3612 w (of) 1392 3612 w (tuples) 1502 3612 w 10 /Times-Italic f (tuplerow) 1768 3612 w 10 /Times-Roman f (,) 2124 3612 w (which) 2176 3612 w (must) 2447 3612 w (already) 2669 3612 w (have) 2989 3612 w (its) 3204 3612 w (column) 3326 3612 w (pointers) 3653 3612 w (set) 4002 3612 w (up) 4140 3612 w (so) 4267 3612 w (that) 4383 3612 w (it) 4560 3612 w (forms) 4643 3612 w (a) 4903 3612 w (C) 4973 3612 w (2\255dimensional array.) 720 3732 w (The leftmost tuple is Element 0 of this array.) 1596 3732 w 10 /Times-Bold f (pnm) 720 3888 w 10 /S f (_) 915 3888 w 10 /Times-Bold f (readpam\(\)) 965 3888 w 10 /Times-Roman f (reads) 1440 3888 w (an) 1676 3888 w (entire) 1796 3888 w (image) 2050 3888 w (from) 2321 3888 w (a) 2542 3888 w (PAM) 2613 3888 w (or) 2857 3888 w (PNM) 2967 3888 w (image) 3211 3888 w (file) 3482 3888 w (and) 3642 3888 w (allocates) 3813 3888 w (the) 4189 3888 w (space) 4338 3888 w (in) 4586 3888 w (which) 4691 3888 w (to) 4962 3888 w (return) 720 4008 w (the) 987 4008 w (raster.) 1138 4008 w (It) 1438 4008 w (expects) 1528 4008 w (to) 1856 4008 w (find) 1963 4008 w (the) 2153 4008 w (file) 2304 4008 w (positioned) 2466 4008 w (to) 2912 4008 w (the) 3018 4008 w (first) 3168 4008 w (byte) 3357 4008 w (of) 3557 4008 w (the) 3668 4008 w (image) 3818 4008 w (and) 4090 4008 w (leaves) 4262 4008 w (it) 4539 4008 w (positioned) 4623 4008 w (just after the image.) 720 4128 w (The) 745 4284 w (function) 929 4284 w (does) 1291 4284 w (not) 1503 4284 w (require) 1660 4284 w 10 /Times-Bold f (*) 1971 4284 w 10 /Times-Italic f (pamP) 2021 4284 w 10 /Times-Roman f (to) 2284 4284 w (have) 2392 4284 w (any) 2610 4284 w (of) 2784 4284 w (its) 2897 4284 w (members) 3022 4284 w (set) 3418 4284 w (and) 3559 4284 w (sets) 3733 4284 w (them) 3913 4284 w (all.) 4143 4284 w 10 /Times-Italic f (size) 4323 4284 w 10 /Times-Roman f (is) 4503 4284 w (the) 4600 4284 w (storage) 4752 4284 w (size in bytes of the) 720 4404 w 10 /Times-Bold f (*) 1494 4404 w 10 /Times-Italic f (pamP) 1544 4404 w 10 /Times-Roman f (structure, normally) 1802 4404 w 10 /Times-Bold f (sizeof\(struct pam\)) 2587 4404 w 10 /Times-Roman f (.) 3354 4404 w (The) 720 4560 w (return) 905 4560 w (value) 1173 4560 w (is) 1419 4560 w (a) 1517 4560 w (newly) 1592 4560 w (allocated) 1867 4560 w (array) 2258 4560 w (of) 2493 4560 w (the) 2607 4560 w (rows) 2760 4560 w (of) 2985 4560 w (the) 3099 4560 w (image,) 3252 4560 w (with) 3552 4560 w (the) 3761 4560 w (top) 3914 4560 w (row) 4073 4560 w (being) 4259 4560 w (Element) 4512 4560 w (0) 4876 4560 w (of) 4957 4560 w (the array.) 720 4680 w (Each row is represented as) 1146 4680 w 10 /Times-Bold f (pnm) 2234 4680 w 10 /S f (_) 2429 4680 w 10 /Times-Bold f (readpamrow\(\)) 2479 4680 w 10 /Times-Roman f (would return.) 3119 4680 w (The) 720 4836 w (return) 902 4836 w (value) 1167 4836 w (is) 1410 4836 w (also) 1504 4836 w (effectively) 1692 4836 w (a) 2145 4836 w (3\255dimensional) 2216 4836 w (C) 2816 4836 w (array) 2911 4836 w (of) 3143 4836 w (samples,) 3254 4836 w (with) 3629 4836 w (the) 3835 4836 w (dimensions) 3985 4836 w (corresponding) 4469 4836 w (to the height, width, and depth of the image, in that order.) 720 4956 w 10 /Times-Bold f (pnm) 720 5112 w 10 /S f (_) 915 5112 w 10 /Times-Bold f (readpam\(\)) 965 5112 w 10 /Times-Roman f (combines) 1440 5112 w (the) 1849 5112 w (functions) 1997 5112 w (of) 2396 5112 w 10 /Times-Bold f (pnm) 2506 5112 w 10 /S f (_) 2701 5112 w 10 /Times-Bold f (allocpamarray\(\)) 2751 5112 w 10 /Times-Roman f (,) 3444 5112 w 10 /Times-Bold f (pnm) 3496 5112 w 10 /S f (_) 3691 5112 w 10 /Times-Bold f (readpaminit\(\)) 3741 5112 w 10 /Times-Roman f (,) 4335 5112 w (and) 4387 5112 w (iterations) 4558 5112 w (of) 4957 5112 w 10 /Times-Bold f (pnm) 720 5232 w 10 /S f (_) 915 5232 w 10 /Times-Bold f (readpamrow\(\)) 965 5232 w 10 /Times-Roman f (.) 1580 5232 w (It may require more dynamic storage than you can afford.) 1655 5232 w 10 /Times-Bold f (pnm) 720 5388 w 10 /S f (_) 915 5388 w 10 /Times-Bold f (readpamrown\(\)) 965 5388 w 10 /Times-Roman f (is) 1673 5388 w (like) 1777 5388 w 10 /Times-Bold f (pnm) 1964 5388 w 10 /S f (_) 2159 5388 w 10 /Times-Bold f (readpamrow\(\)) 2209 5388 w 10 /Times-Roman f (except) 2861 5388 w (that) 3158 5388 w (it) 3345 5388 w (returns) 3438 5388 w (the) 3752 5388 w (row) 3911 5388 w (contents) 4104 5388 w (in) 4475 5388 w (normalized) 4591 5388 w (form \(composed of normalized tuples \() 720 5508 w 10 /Times-Bold f (tuplen) 2281 5508 w 10 /Times-Roman f (\) instead of basic form \() 2554 5508 w 10 /Times-Bold f (tuple) 3510 5508 w 10 /Times-Roman f (\).) 3727 5508 w 10 /Times-Bold f (pnm) 720 5664 w 10 /S f (_) 915 5664 w 10 /Times-Bold f (readpaminit\(\)) 965 5664 w 10 /Times-Roman f (and) 1590 5664 w 10 /Times-Bold f (pnm) 1765 5664 w 10 /S f (_) 1960 5664 w 10 /Times-Bold f (readpam) 2010 5664 w 10 /Times-Roman f (abort) 2424 5664 w (the) 2660 5664 w (program) 2813 5664 w (with) 3182 5664 w (a) 3391 5664 w (message) 3467 5664 w (to) 3837 5664 w (Standard) 3947 5664 w (Error) 4334 5664 w (if) 4576 5664 w (the) 4669 5664 w (PAM) 4823 5664 w (or) 720 5784 w (PNM) 832 5784 w (image) 1078 5784 w (header) 1351 5784 w (is) 1645 5784 w (not) 1741 5784 w (syntactically) 1898 5784 w (valid,) 2432 5784 w (including) 2686 5784 w (if) 3093 5784 w (it) 3183 5784 w (contains) 3268 5784 w (a) 3630 5784 w (number) 3703 5784 w (too) 4036 5784 w (large) 4192 5784 w (to) 4419 5784 w (be) 4525 5784 w (processed) 4647 5784 w (using the system's normal data structures \(to wit, a number that won't fit in a C 'int'\).) 720 5904 w 10 /Times-Bold f (Writing Netpbm Files) 720 6144 w (Synopsis) 720 6420 w (void pnm) 720 6612 w 10 /S f (_) 1124 6612 w 10 /Times-Bold f (writepaminit\( struct pam *) 1174 6612 w 10 /Times-Italic f (pamP) 2325 6612 w 10 /Times-Bold f (\);) 2558 6612 w (void pnm) 720 6768 w 10 /S f (_) 1124 6768 w 10 /Times-Bold f (writepamrow\( struct pam *) 1174 6768 w 10 /Times-Italic f (pamP) 2346 6768 w 10 /Times-Bold f (, const tuple *) 2579 6768 w 10 /Times-Italic f (tuplerow) 3168 6768 w 10 /Times-Bold f (\);) 3524 6768 w (void pnm) 720 6924 w 10 /S f (_) 1124 6924 w 10 /Times-Bold f (writepam\( struct pam *) 1174 6924 w 10 /Times-Italic f (pamP) 2180 6924 w 10 /Times-Bold f (, const tuple * const *) 2413 6924 w 10 /Times-Italic f (tuplearray) 3324 6924 w 10 /Times-Bold f (\);) 3746 6924 w (void pnm) 720 7080 w 10 /S f (_) 1124 7080 w 10 /Times-Bold f (writepamrown\( struct pam *) 1174 7080 w 10 /Times-Italic f (pamP) 2402 7080 w 10 /Times-Bold f (, const tuplen *) 2635 7080 w 10 /Times-Italic f (tuplerown) 3280 7080 w 10 /Times-Bold f (\);) 3686 7080 w (void) 720 7236 w (pnm) 944 7236 w 10 /S f (_) 1139 7236 w 10 /Times-Bold f (formatpamrow\() 1189 7236 w (struct) 1910 7236 w (pam) 2199 7236 w (*) 2428 7236 w 10 /Times-Italic f (pamP) 2478 7236 w 10 /Times-Bold f (,) 2711 7236 w (const) 2776 7236 w (tuple) 3039 7236 w (*) 3297 7236 w 10 /Times-Italic f (tuplerow) 3347 7236 w 10 /Times-Bold f (unsigned) 3744 7236 w (char) 4170 7236 w (*) 4405 7236 w (const) 4496 7236 w 10 /Times-Italic f (outbuf) 4759 7236 w 10 /Times-Bold f (,) 5015 7236 w cleartomark showpage saveobj restore %%EndPage: 3 3 %%Page: 4 4 /saveobj save def mark 4 pagesetup 10 /Times-Roman f (\255 4 \255) 2797 480 w 10 /Times-Bold f (unsigned int * const) 720 840 w 10 /Times-Italic f (rowSizeP) 1594 840 w 10 /Times-Bold f (\);) 1997 840 w (Description) 720 1080 w (pnm) 720 1272 w 10 /S f (_) 915 1272 w 10 /Times-Bold f (writepaminit\(\)) 965 1272 w 10 /Times-Roman f (writes) 1619 1272 w (the) 1896 1272 w (header) 2051 1272 w (of) 2349 1272 w (a) 2465 1272 w (PAM) 2542 1272 w (or) 2792 1272 w (PNM) 2908 1272 w (image) 3158 1272 w (and) 3435 1272 w (computes) 3612 1272 w (some) 4028 1272 w (of) 4272 1272 w (the) 4389 1272 w (fields) 4545 1272 w (of) 4801 1272 w (the) 4918 1272 w (pam structure.) 720 1392 w (See above for a description of the) 720 1548 w 10 /Times-Italic f (pamP) 2086 1548 w 10 /Times-Roman f (argument.) 2344 1548 w (The) 720 1704 w (following) 908 1704 w (members) 1330 1704 w (of) 1729 1704 w (the) 1845 1704 w 10 /Times-Bold f (*) 2001 1704 w 10 /Times-Italic f (pamP) 2051 1704 w 10 /Times-Roman f (structure) 2318 1704 w (must) 2701 1704 w (be) 2930 1704 w (set) 3058 1704 w (upon) 3203 1704 w (invocation) 3437 1704 w (to) 3893 1704 w (tell) 4005 1704 w (the) 4167 1704 w (function) 4323 1704 w (how) 4690 1704 w (and) 4896 1704 w (what to write.) 720 1824 w 10 /Times-Bold f (size) 1322 1824 w 10 /Times-Roman f (,) 1477 1824 w 10 /Times-Bold f (len) 1527 1824 w 10 /Times-Roman f (,) 1655 1824 w 10 /Times-Bold f (file) 1705 1824 w 10 /Times-Roman f (,) 1838 1824 w 10 /Times-Bold f (format) 1888 1824 w 10 /Times-Roman f (,) 2181 1824 w 10 /Times-Bold f (height) 2231 1824 w 10 /Times-Roman f (,) 2498 1824 w 10 /Times-Bold f (width) 2548 1824 w 10 /Times-Roman f (,) 2793 1824 w 10 /Times-Bold f (depth) 2843 1824 w 10 /Times-Roman f (,) 3088 1824 w 10 /Times-Bold f (maxval) 3138 1824 w 10 /Times-Roman f (,) 3449 1824 w 10 /Times-Bold f (tuple) 3499 1824 w 10 /S f (_) 3716 1824 w 10 /Times-Bold f (type) 3766 1824 w 10 /Times-Roman f (.) 3949 1824 w 10 /Times-Bold f (pnm) 720 1980 w 10 /S f (_) 915 1980 w 10 /Times-Bold f (writepaminit\(\)) 965 1980 w 10 /Times-Roman f (sets) 1613 1980 w (the) 1790 1980 w 10 /Times-Bold f (plainformat) 1939 1980 w 10 /Times-Roman f (and) 2477 1980 w 10 /Times-Bold f (bytes) 2648 1980 w 10 /S f (_) 2870 1980 w 10 /Times-Bold f (per) 2920 1980 w 10 /S f (_) 3064 1980 w 10 /Times-Bold f (sample) 3114 1980 w 10 /Times-Roman f (members) 3441 1980 w (based) 3835 1980 w (on) 4090 1980 w (the) 4218 1980 w (information) 4368 1980 w (sup\255) 4868 1980 w (plied.) 720 2100 w 10 /Times-Bold f (pnm) 720 2256 w 10 /S f (_) 915 2256 w 10 /Times-Bold f (writepamrow\(\)) 965 2256 w 10 /Times-Roman f (writes) 1636 2256 w (a) 1909 2256 w (row) 1982 2256 w (of) 2166 2256 w (the) 2279 2256 w (raster) 2431 2256 w (into) 2682 2256 w (a) 2868 2256 w (PAM) 2942 2256 w (or) 3189 2256 w (PNM) 3302 2256 w (image) 3549 2256 w (file.) 3823 2256 w (It) 4036 2256 w (expects) 4127 2256 w (to) 4456 2256 w (find) 4564 2256 w (the) 4755 2256 w (file) 4907 2256 w (positioned) 720 2376 w (where) 1168 2376 w (the) 1442 2376 w (row) 1595 2376 w (should) 1781 2376 w (start) 2079 2376 w (and) 2281 2376 w (leaves) 2455 2376 w (it) 2734 2376 w (positioned) 2820 2376 w (just) 3267 2376 w (after) 3442 2376 w (the) 3654 2376 w (row.) 3806 2376 w (The) 4041 2376 w (function) 4226 2376 w (requires) 4589 2376 w (all) 4940 2376 w (the elements of) 720 2496 w 10 /Times-Bold f (*) 1355 2496 w 10 /Times-Italic f (pamP) 1405 2496 w 10 /Times-Roman f (to be set upon invocation and doesn't modify them.) 1663 2496 w 10 /Times-Italic f (tuplerow) 720 2652 w 10 /Times-Roman f (is an array of tuples representing the row.) 1101 2652 w (The leftmost tuple is Element 0 of this array.) 2808 2652 w 10 /Times-Bold f (pnm) 720 2808 w 10 /S f (_) 915 2808 w 10 /Times-Bold f (writepam\(\)) 965 2808 w 10 /Times-Roman f (writes an entire PAM or PNM image to) 1466 2808 w (a) 3071 2808 w (PAM) 3141 2808 w (or) 3384 2808 w (PNM) 3493 2808 w (image) 3736 2808 w (file.) 4006 2808 w (It) 4215 2808 w (expects) 4302 2808 w (to) 4627 2808 w (find) 4731 2808 w (the) 4918 2808 w (file positioned to where the image should start and leaves it positioned just after the image.) 720 2928 w (The) 720 3084 w (following) 908 3084 w (members) 1330 3084 w (of) 1729 3084 w (the) 1845 3084 w 10 /Times-Bold f (*) 2001 3084 w 10 /Times-Italic f (pamP) 2051 3084 w 10 /Times-Roman f (structure) 2318 3084 w (must) 2701 3084 w (be) 2930 3084 w (set) 3058 3084 w (upon) 3203 3084 w (invocation) 3437 3084 w (to) 3893 3084 w (tell) 4005 3084 w (the) 4167 3084 w (function) 4323 3084 w (how) 4690 3084 w (and) 4896 3084 w (what to write:) 720 3204 w 10 /Times-Bold f (size) 1300 3204 w 10 /Times-Roman f (,) 1455 3204 w 10 /Times-Bold f (len) 1505 3204 w 10 /Times-Roman f (,) 1633 3204 w 10 /Times-Bold f (file) 1683 3204 w 10 /Times-Roman f (,) 1816 3204 w 10 /Times-Bold f (format) 1866 3204 w 10 /Times-Roman f (,) 2159 3204 w 10 /Times-Bold f (height) 2209 3204 w 10 /Times-Roman f (,) 2476 3204 w 10 /Times-Bold f (width) 2526 3204 w 10 /Times-Roman f (,) 2771 3204 w 10 /Times-Bold f (depth) 2821 3204 w 10 /Times-Roman f (,) 3066 3204 w 10 /Times-Bold f (maxval) 3116 3204 w 10 /Times-Roman f (,) 3427 3204 w 10 /Times-Bold f (tuple) 3477 3204 w 10 /S f (_) 3694 3204 w 10 /Times-Bold f (type) 3744 3204 w 10 /Times-Roman f (.) 3927 3204 w 10 /Times-Bold f (pnm) 720 3360 w 10 /S f (_) 915 3360 w 10 /Times-Bold f (writepam\(\)) 965 3360 w 10 /Times-Roman f (sets) 1481 3360 w (the) 1671 3360 w 10 /Times-Bold f (plainformat) 1833 3360 w 10 /Times-Roman f (and) 2384 3360 w 10 /Times-Bold f (bytes) 2569 3360 w 10 /S f (_) 2791 3360 w 10 /Times-Bold f (per) 2841 3360 w 10 /S f (_) 2985 3360 w 10 /Times-Bold f (sample) 3035 3360 w 10 /Times-Roman f (members) 3376 3360 w (based) 3783 3360 w (on) 4051 3360 w (the) 4192 3360 w (information) 4355 3360 w (sup\255) 4868 3360 w (plied.) 720 3480 w 10 /Times-Italic f (tuplearray) 720 3636 w 10 /Times-Roman f (is) 1174 3636 w (an) 1273 3636 w (array) 1399 3636 w (of) 1635 3636 w (rows) 1750 3636 w (such) 1977 3636 w (that) 2193 3636 w (you) 2376 3636 w (would) 2559 3636 w (pass) 2842 3636 w (to) 3047 3636 w 10 /Times-Bold f (pnm) 3158 3636 w 10 /S f (_) 3353 3636 w 10 /Times-Bold f (writepamrow\(\)) 3403 3636 w 10 /Times-Roman f (,) 4045 3636 w (with) 4103 3636 w (the) 4314 3636 w (top) 4469 3636 w (row) 4630 3636 w (being) 4818 3636 w (Element 0 of the array.) 720 3756 w 10 /Times-Bold f (pnm) 720 3912 w 10 /S f (_) 915 3912 w 10 /Times-Bold f (writepam\(\)) 965 3912 w 10 /Times-Roman f (combines) 1467 3912 w (the) 1876 3912 w (functions) 2024 3912 w (of) 2422 3912 w 10 /Times-Bold f (pnm) 2531 3912 w 10 /S f (_) 2726 3912 w 10 /Times-Bold f (writepaminit\(\)) 2776 3912 w 10 /Times-Roman f (,) 3397 3912 w (and) 3448 3912 w (iterations) 3619 3912 w (of) 4018 3912 w 10 /Times-Bold f (pnm) 4128 3912 w 10 /S f (_) 4323 3912 w 10 /Times-Bold f (writepamrow\(\)) 4373 3912 w 10 /Times-Roman f (.) 5015 3912 w (Its raster input may be more storage than you can afford.) 720 4032 w 10 /Times-Bold f (pnm) 720 4188 w 10 /S f (_) 915 4188 w 10 /Times-Bold f (writepamrown\(\)) 965 4188 w 10 /Times-Roman f (is) 1701 4188 w (like) 1806 4188 w 10 /Times-Bold f (pnm) 1994 4188 w 10 /S f (_) 2189 4188 w 10 /Times-Bold f (writepamrow\(\)) 2239 4188 w 10 /Times-Roman f (except) 2920 4188 w (that) 3219 4188 w (it) 3408 4188 w (takes) 3503 4188 w (the) 3747 4188 w (row) 3908 4188 w (contents) 4102 4188 w (in) 4474 4188 w (normalized) 4591 4188 w (form \(composed of normalized tuples \() 720 4308 w 10 /Times-Bold f (tuplen) 2281 4308 w 10 /Times-Roman f (\) instead of basic form \() 2554 4308 w 10 /Times-Bold f (tuple) 3510 4308 w 10 /Times-Roman f (\).) 3727 4308 w 10 /Times-Bold f (pnm) 720 4464 w 10 /S f (_) 915 4464 w 10 /Times-Bold f (formatpamrow\(\)) 965 4464 w 10 /Times-Roman f (is like) 1704 4464 w 10 /Times-Bold f (pnm) 1971 4464 w 10 /S f (_) 2166 4464 w 10 /Times-Bold f (writepamrow\(\)) 2216 4464 w 10 /Times-Roman f (, except that instead of) 2858 4464 w (writing) 3785 4464 w (a) 4100 4464 w (row) 4170 4464 w (to) 4351 4464 w (a) 4455 4464 w (file,) 4525 4464 w (it) 4709 4464 w (places) 4791 4464 w (the) 720 4584 w (same) 873 4584 w (bytes) 1109 4584 w (that) 1351 4584 w (would) 1532 4584 w (go) 1813 4584 w (in) 1944 4584 w (the) 2053 4584 w (file) 2206 4584 w (in) 2370 4584 w (a) 2478 4584 w (buffer) 2552 4584 w (you) 2825 4584 w (supply.) 3005 4584 w (There) 3352 4584 w (isn't) 3614 4584 w (an) 3822 4584 w (equivalent) 3946 4584 w (function) 4392 4584 w (to) 4755 4584 w (con\255) 4863 4584 w (struct) 720 4704 w (an) 971 4704 w (image) 1094 4704 w (header;) 1367 4704 w (i.e.) 1689 4704 w (there) 1840 4704 w (is) 2068 4704 w (no) 2164 4704 w (analog) 2293 4704 w (to) 2588 4704 w 10 /Times-Bold f (pnm) 2695 4704 w 10 /S f (_) 2890 4704 w 10 /Times-Bold f (writepaminit\(\)) 2940 4704 w 10 /Times-Roman f (.) 3561 4704 w (But) 3640 4704 w (the) 3814 4704 w (header) 3965 4704 w (format,) 4259 4704 w (particularly) 4580 4704 w (for PAM, is so simple that you can easily build it yourself with standard C library string functions.) 720 4824 w 10 /Times-Bold f (pnm) 720 4980 w 10 /S f (_) 915 4980 w 10 /Times-Bold f (formatpamrow\(\)) 965 4980 w 10 /Times-Roman f (was new in Netpbm 10.25 \(October 2004\).) 1704 4980 w 10 /Times-Bold f (Transforming Pixels) 720 5220 w (Synopsis) 720 5496 w (void pnm) 720 5688 w 10 /S f (_) 1124 5688 w 10 /Times-Bold f (YCbCrtuple\() 1174 5688 w (tuple) 720 5808 w 10 /Times-Italic f (tuple) 937 5808 w 10 /Times-Bold f (, double *) 1137 5808 w 10 /Times-Italic f (YP) 1552 5808 w 10 /Times-Bold f (, double *) 1669 5808 w 10 /Times-Italic f (CrP) 2084 5808 w 10 /Times-Bold f (, double *) 2251 5808 w 10 /Times-Italic f (CbP) 2666 5808 w 10 /Times-Bold f (\);) 2844 5808 w (void pnm) 720 5964 w 10 /S f (_) 1124 5964 w 10 /Times-Bold f (YCbCr) 1174 5964 w 10 /S f (_) 1490 5964 w 10 /Times-Bold f (to) 1540 5964 w 10 /S f (_) 1623 5964 w 10 /Times-Bold f (rgbtuple\() 1673 5964 w (const struct pam * const) 720 6084 w 10 /Times-Italic f (pamP) 1777 6084 w 10 /Times-Bold f (,) 2010 6084 w (tuple) 720 6204 w (const) 1287 6204 w 10 /Times-Italic f (tuple) 1534 6204 w 10 /Times-Bold f (,) 1734 6204 w (double) 720 6324 w (const) 1335 6324 w 10 /Times-Italic f (Y) 1582 6324 w 10 /Times-Bold f (, double) 1638 6324 w (const) 2303 6324 w 10 /Times-Italic f (Cb) 2550 6324 w 10 /Times-Bold f (, double) 2667 6324 w (const) 3332 6324 w 10 /Times-Italic f (Cr) 3579 6324 w 10 /Times-Bold f (,) 3685 6324 w (int *) 720 6444 w (const) 1262 6444 w 10 /Times-Italic f (overflowP) 1509 6444 w 10 /Times-Bold f (\);) 1945 6444 w (extern double pnm) 720 6600 w 10 /S f (_) 1526 6600 w 10 /Times-Bold f (lumin) 1576 6600 w 10 /S f (_) 1827 6600 w 10 /Times-Bold f (factor[3];) 1877 6600 w (void pnm) 720 6756 w 10 /S f (_) 1124 6756 w 10 /Times-Bold f (normalizetuple\() 1174 6756 w (struct pam * const) 720 6876 w 10 /Times-Italic f (pamP) 1530 6876 w 10 /Times-Bold f (, tuple) 1763 6876 w (const) 2230 6876 w 10 /Times-Italic f (tuple) 2477 6876 w 10 /Times-Bold f (, tuplen) 2677 6876 w (const) 3175 6876 w 10 /Times-Italic f (tuplen) 3422 6876 w 10 /Times-Bold f (\);) 3672 6876 w (void pnm) 720 7032 w 10 /S f (_) 1124 7032 w 10 /Times-Bold f (unnormalizetuple\() 1174 7032 w (struct pam * const) 720 7152 w 10 /Times-Italic f (pamP) 1530 7152 w 10 /Times-Bold f (, tuplen) 1763 7152 w (const) 2261 7152 w 10 /Times-Italic f (tuplen) 2508 7152 w 10 /Times-Bold f (, tuple) 2758 7152 w (const) 3225 7152 w 10 /Times-Italic f (tuple) 3472 7152 w 10 /Times-Bold f (\);) 3672 7152 w (void pnm) 720 7308 w 10 /S f (_) 1124 7308 w 10 /Times-Bold f (normalizeRow\() 1174 7308 w cleartomark showpage saveobj restore %%EndPage: 4 4 %%Page: 5 5 /saveobj save def mark 5 pagesetup 10 /Times-Roman f (\255 5 \255) 2797 480 w 10 /Times-Bold f (struct) 720 840 w (pam) 1001 840 w (*) 1222 840 w (const) 1454 840 w 10 /Times-Italic f (pamP) 1708 840 w 10 /Times-Bold f (,) 1941 840 w (const) 1998 840 w (tuple) 2252 840 w (*) 2501 840 w (const) 2708 840 w 10 /Times-Italic f (tuplerow) 2962 840 w 10 /Times-Bold f (,) 3318 840 w (pnm) 3375 840 w 10 /S f (_) 3570 840 w 10 /Times-Bold f (transformMap) 3620 840 w (*) 4284 840 w (const) 4366 840 w 10 /Times-Italic f (transform) 4620 840 w 10 /Times-Bold f (,) 5015 840 w (tuplen *) 720 960 w (const) 1343 960 w 10 /Times-Italic f (tuplenrow) 1590 960 w 10 /Times-Bold f (\);) 1996 960 w (void pnm) 720 1116 w 10 /S f (_) 1124 1116 w 10 /Times-Bold f (unnormalizeRow\() 1174 1116 w (struct pam *) 720 1236 w (const) 1433 1236 w 10 /Times-Italic f (pamP) 1681 1236 w 10 /Times-Bold f (,) 1914 1236 w (const) 1965 1236 w (tuplen) 2213 1236 w (*) 2512 1236 w (const) 2688 1236 w 10 /Times-Italic f (tuplenrow) 2936 1236 w 10 /Times-Bold f (,) 3342 1236 w (pnm) 3393 1236 w 10 /S f (_) 3588 1236 w 10 /Times-Bold f (transformMap) 3638 1236 w (*) 4296 1236 w (const) 4372 1236 w 10 /Times-Italic f (transform) 4620 1236 w 10 /Times-Bold f (,) 5015 1236 w (tuple *) 720 1356 w (const) 1312 1356 w 10 /Times-Italic f (tuplerow) 1559 1356 w 10 /Times-Bold f (\);) 1915 1356 w (void pnm) 720 1512 w 10 /S f (_) 1124 1512 w 10 /Times-Bold f (gammarown\() 1174 1512 w (struct pam * const) 720 1632 w 10 /Times-Italic f (pamP) 1530 1632 w 10 /Times-Bold f (, tuplen *) 1763 1632 w (const) 2286 1632 w 10 /Times-Italic f (row) 2533 1632 w 10 /Times-Bold f (\);) 2714 1632 w (void pnm) 720 1788 w 10 /S f (_) 1124 1788 w 10 /Times-Bold f (ungammarown\() 1174 1788 w (struct pam * const) 720 1908 w 10 /Times-Italic f (pamP) 1530 1908 w 10 /Times-Bold f (, tuplen *) 1763 1908 w (const) 2286 1908 w 10 /Times-Italic f (row) 2533 1908 w 10 /Times-Bold f (\);) 2714 1908 w (void pnm) 720 2064 w 10 /S f (_) 1124 2064 w 10 /Times-Bold f (applyopacityrown\() 1174 2064 w (struct pam * const) 720 2184 w 10 /Times-Italic f (pamP) 1530 2184 w 10 /Times-Bold f (, tuplen *) 1763 2184 w (const) 2286 2184 w 10 /Times-Italic f (tuplenrow) 2533 2184 w 10 /Times-Bold f (\);) 2964 2184 w (void pnm) 720 2340 w 10 /S f (_) 1124 2340 w 10 /Times-Bold f (unapplyopacityrown\() 1174 2340 w (struct pam * const) 720 2460 w 10 /Times-Italic f (pamP) 1530 2460 w 10 /Times-Bold f (, tuplen *) 1763 2460 w (const) 2286 2460 w 10 /Times-Italic f (tuplenrow) 2533 2460 w 10 /Times-Bold f (\);) 2964 2460 w (pnm) 720 2616 w 10 /S f (_) 915 2616 w 10 /Times-Bold f (transformMap * pnm) 965 2616 w 10 /S f (_) 1892 2616 w 10 /Times-Bold f (creategammatransform\() 1942 2616 w (const struct pam * const) 720 2736 w 10 /Times-Italic f (pamP) 1777 2736 w 10 /Times-Bold f (\);) 2035 2736 w (void pnm) 720 2892 w 10 /S f (_) 1124 2892 w 10 /Times-Bold f (freegammatransform\() 1174 2892 w (const pnm) 720 3012 w 10 /S f (_) 1162 3012 w 10 /Times-Bold f (transformMap * const) 1212 3012 w 10 /Times-Italic f (transform) 2191 3012 w 10 /Times-Bold f (, const struct pam *) 2586 3012 w (const) 3596 3012 w 10 /Times-Italic f (pamP) 3843 3012 w 10 /Times-Bold f (\);) 4101 3012 w (pnm) 720 3168 w 10 /S f (_) 915 3168 w 10 /Times-Bold f (transformMap * pnm) 965 3168 w 10 /S f (_) 1892 3168 w 10 /Times-Bold f (createungammatransform\() 1942 3168 w (const struct pam * const) 720 3288 w 10 /Times-Italic f (pamP) 1777 3288 w 10 /Times-Bold f (\);) 2035 3288 w (void pnm) 720 3444 w 10 /S f (_) 1124 3444 w 10 /Times-Bold f (freeungammatransform\() 1174 3444 w (const pnm) 720 3564 w 10 /S f (_) 1162 3564 w 10 /Times-Bold f (transformMap * const) 1212 3564 w 10 /Times-Italic f (transform) 2191 3564 w 10 /Times-Bold f (, const struct pam *) 2586 3564 w (const) 3596 3564 w 10 /Times-Italic f (pamP) 3843 3564 w 10 /Times-Bold f (\);) 4101 3564 w (Description) 720 3804 w (pnm) 720 3996 w 10 /S f (_) 915 3996 w 10 /Times-Bold f (YCbCrtuple\(\)) 965 3996 w 10 /Times-Roman f (returns) 1601 3996 w (the) 1915 3996 w (Y/Cb/Cr) 2074 3996 w (luminance/chrominance) 2457 3996 w (representation) 3454 3996 w (of) 4057 3996 w (the) 4178 3996 w (color) 4338 3996 w (represented) 4581 3996 w (by) 720 4116 w (the) 850 4116 w (input) 1002 4116 w (tuple,) 1238 4116 w (assuming) 1493 4116 w (that) 1901 4116 w (the) 2081 4116 w (tuple) 2233 4116 w (is) 2463 4116 w (an) 2560 4116 w (RGB) 2684 4116 w (color) 2920 4116 w (representation) 3155 4116 w (\(which) 3750 4116 w (is) 4057 4116 w (the) 4154 4116 w (case) 4306 4116 w (if) 4507 4116 w (it) 4598 4116 w (was) 4684 4116 w (read) 4869 4116 w (from) 720 4236 w (a) 945 4236 w (PPM) 1020 4236 w (image\).) 1252 4236 w (The) 1610 4236 w (output) 1796 4236 w (components) 2083 4236 w (are) 2597 4236 w (based) 2749 4236 w (on) 3007 4236 w (the) 3138 4236 w (same) 3291 4236 w (scale) 3527 4236 w (\(maxval\)) 3757 4236 w (as) 4148 4236 w (the) 4263 4236 w (input) 4417 4236 w (tuple,) 4655 4236 w (but) 4912 4236 w (are) 720 4356 w (floating) 873 4356 w (point) 1216 4356 w (nonetheless) 1454 4356 w (to) 1952 4356 w (avoid) 2061 4356 w (losing) 2314 4356 w (information) 2590 4356 w (due) 3093 4356 w (to) 3268 4356 w (rounding.) 3377 4356 w (Divide) 3819 4356 w (them) 4122 4356 w (by) 4353 4356 w (the) 4484 4356 w (maxval) 4637 4356 w (to) 4962 4356 w (get normalized [0..1] values.) 720 4476 w 10 /Times-Bold f (pnm) 720 4632 w 10 /S f (_) 915 4632 w 10 /Times-Bold f (YCbCr) 965 4632 w 10 /S f (_) 1281 4632 w 10 /Times-Bold f (to) 1331 4632 w 10 /S f (_) 1414 4632 w 10 /Times-Bold f (rgbtuple\(\)) 1464 4632 w 10 /Times-Roman f (does the reverse.) 1922 4632 w 10 /Times-Italic f (pamP) 2639 4632 w 10 /Times-Roman f (indicates the maxval for the) 2897 4632 w (returned) 4032 4632 w 10 /Times-Italic f (tuple) 4390 4632 w 10 /Times-Roman f (,) 4590 4632 w (and) 4641 4632 w (the) 4811 4632 w 10 /Times-Italic f (Y) 4959 4632 w 10 /Times-Roman f (,) 5015 4632 w 10 /Times-Italic f (Cb) 720 4752 w 10 /Times-Roman f (, and) 837 4752 w 10 /Times-Italic f (Cr) 1056 4752 w 10 /Times-Roman f (arguments are of the same scale.) 1187 4752 w (It) 720 4908 w (is) 813 4908 w (possible) 912 4908 w (for) 1272 4908 w 10 /Times-Italic f (Y) 1421 4908 w 10 /Times-Roman f (,) 1477 4908 w 10 /Times-Italic f (Cb) 1535 4908 w 10 /Times-Roman f (,) 1652 4908 w (and) 1710 4908 w 10 /Times-Italic f (Cr) 1887 4908 w 10 /Times-Roman f (to) 2026 4908 w (describe) 2137 4908 w (a) 2502 4908 w (color) 2579 4908 w (that) 2817 4908 w (cannot) 3000 4908 w (be) 3299 4908 w (represented) 3426 4908 w (in) 3918 4908 w (RGB) 4029 4908 w (form.) 4268 4908 w (In) 4545 4908 w (that) 4661 4908 w (case,) 4844 4908 w 10 /Times-Bold f (pnm) 720 5028 w 10 /S f (_) 915 5028 w 10 /Times-Bold f (YCbCr) 965 5028 w 10 /S f (_) 1281 5028 w 10 /Times-Bold f (to) 1331 5028 w 10 /S f (_) 1414 5028 w 10 /Times-Bold f (rgbtuple\(\)) 1464 5028 w 10 /Times-Roman f (chooses) 1924 5028 w (a) 2267 5028 w (color) 2338 5028 w (as) 2570 5028 w (close) 2680 5028 w (as) 2912 5028 w (possible) 3022 5028 w (\(by) 3377 5028 w (clipping) 3536 5028 w (each) 3890 5028 w (component) 4098 5028 w (to) 4568 5028 w (0) 4672 5028 w (and) 4748 5028 w (the) 4918 5028 w (maxval\)) 720 5148 w (and) 1077 5148 w (sets) 1251 5148 w (*overflowP) 1431 5148 w (true.) 1927 5148 w (It) 2163 5148 w (otherwise) 2255 5148 w (sets) 2674 5148 w (*overflowP) 2855 5148 w (false.) 3352 5148 w 10 /Times-Bold f (pnm) 3621 5148 w 10 /S f (_) 3816 5148 w 10 /Times-Bold f (lumin) 3866 5148 w 10 /S f (_) 4117 5148 w 10 /Times-Bold f (factor[]) 4167 5148 w 10 /Times-Roman f (is) 4518 5148 w (the) 4616 5148 w (factors) 4769 5148 w (\(weights\)) 720 5268 w (one) 1126 5268 w (uses) 1299 5268 w (to) 1500 5268 w (compute) 1607 5268 w (the) 1980 5268 w (intensity) 2131 5268 w (of) 2505 5268 w (a) 2617 5268 w (color) 2690 5268 w (\(according) 2924 5268 w (to) 3379 5268 w (some) 3486 5268 w (standard) 3726 5268 w (\255\255) 4093 5268 w (I) 4188 5268 w (don't) 4249 5268 w (know) 4488 5268 w (which\).) 4738 5268 w (pnm) 720 5388 w 10 /S f (_) 898 5388 w 10 /Times-Roman f (lumin) 948 5388 w 10 /S f (_) 1182 5388 w 10 /Times-Roman f (factor[0]) 1232 5388 w (is) 1608 5388 w (for) 1703 5388 w (the) 1848 5388 w (red) 1999 5388 w (component,) 2155 5388 w ([1]) 2653 5388 w (is) 2798 5388 w (for) 2894 5388 w (the) 3039 5388 w (green,) 3190 5388 w (and) 3465 5388 w ([2]) 3638 5388 w (is) 3783 5388 w (for) 3879 5388 w (the) 4024 5388 w (blue.) 4175 5388 w (They) 4426 5388 w (add) 4660 5388 w (up) 4833 5388 w (to) 4962 5388 w (1.) 720 5508 w 10 /Times-Bold f (pnm) 720 5664 w 10 /S f (_) 915 5664 w 10 /Times-Bold f (gammarown\(\)) 965 5664 w 10 /Times-Roman f (and) 1612 5664 w 10 /Times-Bold f (pnm) 1799 5664 w 10 /S f (_) 1994 5664 w 10 /Times-Bold f (ungammarown\(\)) 2044 5664 w 10 /Times-Roman f (apply) 2804 5664 w (and) 3070 5664 w (unapply) 3258 5664 w (gamma) 3624 5664 w (correction) 3962 5664 w (to) 4410 5664 w (a) 4532 5664 w (row) 4620 5664 w (of) 4819 5664 w (an) 4946 5664 w (image) 720 5784 w (using) 995 5784 w (the) 1243 5784 w (same) 1396 5784 w (transformation) 1632 5784 w (as) 2251 5784 w 10 /Times-Bold f (pm) 2365 5784 w 10 /S f (_) 2504 5784 w 10 /Times-Bold f (gamma\(\)) 2554 5784 w 10 /Times-Roman f (and) 2967 5784 w 10 /Times-Bold f (pm) 3141 5784 w 10 /S f (_) 3280 5784 w 10 /Times-Bold f (ungamma\(\)) 3330 5784 w 10 /Times-Roman f (.) 3824 5784 w (Note) 3904 5784 w (that) 4128 5784 w (these) 4308 5784 w (operate) 4543 5784 w (on) 4866 5784 w (a) 4996 5784 w (row of normalized tuples \() 720 5904 w 10 /Times-Bold f (tuplen) 1779 5904 w 10 /Times-Roman f (, not) 2052 5904 w 10 /Times-Bold f (tuple) 2255 5904 w 10 /Times-Roman f (\).) 2472 5904 w 10 /Times-Bold f (pnm) 720 6060 w 10 /S f (_) 915 6060 w 10 /Times-Bold f (applyopacity\(\)) 965 6060 w 10 /Times-Roman f (reduces) 1617 6060 w (the) 1956 6060 w (intensity) 2113 6060 w (of) 2494 6060 w (samples) 2613 6060 w (in) 2971 6060 w (accordance) 3085 6060 w (with) 3568 6060 w (the) 3782 6060 w (opacity) 3940 6060 w (plane) 4270 6060 w (of) 4522 6060 w (an) 4641 6060 w (image.) 4771 6060 w (The) 720 6180 w (opacity) 907 6180 w (plane,) 1233 6180 w (if) 1506 6180 w (it) 1599 6180 w (exists,) 1687 6180 w (tells) 1972 6180 w (how) 2171 6180 w (much) 2375 6180 w (of) 2629 6180 w (the) 2744 6180 w (light) 2898 6180 w (from) 3114 6180 w (that) 3340 6180 w (pixel) 3522 6180 w (should) 3754 6180 w (show) 4053 6180 w (when) 4296 6180 w (the) 4544 6180 w (image) 4698 6180 w (is) 4973 6180 w (composed) 720 6300 w (with) 1152 6300 w (another) 1357 6300 w (image.) 1683 6300 w (You) 2004 6300 w (use) 2203 6300 w 10 /Times-Bold f (pnm) 2363 6300 w 10 /S f (_) 2558 6300 w 10 /Times-Bold f (applyopacity\(\)) 2608 6300 w 10 /Times-Roman f (in) 3252 6300 w (preparation) 3357 6300 w (for) 3838 6300 w (doing) 3981 6300 w (such) 4237 6300 w (a) 4448 6300 w (composition.) 4520 6300 w (For) 720 6420 w (example,) 895 6420 w (if) 1294 6420 w (the) 1391 6420 w (opacity) 1549 6420 w (plane) 1879 6420 w (says) 2131 6420 w (that) 2338 6420 w (the) 2523 6420 w (top) 2680 6420 w (half) 2843 6420 w (of) 3033 6420 w (the) 3151 6420 w (image) 3308 6420 w (is) 3587 6420 w (50%) 3689 6420 w (opaque) 3907 6420 w (and) 4230 6420 w (the) 4409 6420 w (bottom) 4566 6420 w (half) 4885 6420 w (100%) 720 6540 w (opaque,) 989 6540 w 10 /Times-Bold f (pnm) 1338 6540 w 10 /S f (_) 1533 6540 w 10 /Times-Bold f (applyopacity\(\)) 1583 6540 w 10 /Times-Roman f (will) 2236 6540 w (reduce) 2428 6540 w (the) 2729 6540 w (intensity) 2887 6540 w (of) 3268 6540 w (each) 3387 6540 w (sample) 3605 6540 w (of) 3924 6540 w (each) 4044 6540 w (tuple) 4263 6540 w (\(pixel\)) 4500 6540 w (in) 4803 6540 w (the) 4918 6540 w (upper half of the image by 50%, and leave the rest alone.) 720 6660 w (If) 720 6816 w (the) 813 6816 w (image) 962 6816 w (does) 1233 6816 w (not) 1443 6816 w (have) 1598 6816 w (an) 1813 6816 w (opacity) 1934 6816 w (plane) 2255 6816 w (\(i.e.) 2498 6816 w (its) 2680 6816 w (tuple) 2802 6816 w (type) 3029 6816 w (is) 3229 6816 w (not) 3324 6816 w (one) 3480 6816 w (that) 3652 6816 w 10 /Times-Bold f (libnetpbm) 3830 6816 w 10 /Times-Roman f (recognizes) 4298 6816 w (as) 4752 6816 w (hav\255) 4863 6816 w (ing) 720 6936 w (an) 881 6936 w (opacity) 1008 6936 w (plane\),) 1335 6936 w 10 /Times-Bold f (pnm) 1642 6936 w 10 /S f (_) 1837 6936 w 10 /Times-Bold f (applyopacity\(\)) 1887 6936 w 10 /Times-Roman f (does) 2537 6936 w (nothing) 2753 6936 w (\(which) 3092 6936 w (is) 3402 6936 w (the) 3502 6936 w (same) 3657 6936 w (as) 3895 6936 w (assuming) 4011 6936 w (opacity) 4422 6936 w (100%\).) 4749 6936 w (The) 720 7056 w (tuple) 984 7056 w (types) 1293 7056 w (that) 1613 7056 w 10 /Times-Bold f (libnetpbm) 1873 7056 w 10 /Times-Roman f (recognizes) 2423 7056 w (as) 2959 7056 w (having) 3152 7056 w (opacity) 3534 7056 w (are) 3938 7056 w 10 /Times-Bold f (RGB) 4169 7056 w 10 /S f (_) 4386 7056 w 10 /Times-Bold f (ALPHA) 4436 7056 w 10 /Times-Roman f (and) 4896 7056 w 10 /Times-Bold f (GRAYSCALE) 720 7176 w 10 /S f (_) 1348 7176 w 10 /Times-Bold f (ALPHA) 1398 7176 w 10 /Times-Roman f (.) 1748 7176 w cleartomark showpage saveobj restore %%EndPage: 5 5 %%Page: 6 6 /saveobj save def mark 6 pagesetup 10 /Times-Roman f (\255 6 \255) 2797 480 w 10 /Times-Bold f (pnm) 720 840 w 10 /S f (_) 915 840 w 10 /Times-Bold f (unapplyopacity\(\)) 965 840 w 10 /Times-Roman f (does) 1729 840 w (the) 1947 840 w (reverse.) 2104 840 w (It) 2476 840 w (assumes) 2572 840 w (the) 2940 840 w (intensities) 3097 840 w (are) 3538 840 w (already) 3695 840 w (reduced) 4024 840 w (according) 4375 840 w (to) 4804 840 w (the) 4918 840 w (opacity plane, and raises back to normal.) 720 960 w 10 /Times-Bold f (pnm) 720 1116 w 10 /S f (_) 915 1116 w 10 /Times-Bold f (applyopacity\(\)) 965 1116 w 10 /Times-Roman f (works) 1615 1116 w (on) 1892 1116 w (\(takes) 2025 1116 w (as) 2296 1116 w (input) 2412 1116 w (and) 2651 1116 w (produces) 2828 1116 w (as) 3221 1116 w (output\)) 3337 1116 w (normalized,) 3660 1116 w (intensity\255proportional) 4168 1116 w (tuples.) 720 1236 w (That) 1047 1236 w (means) 1268 1236 w (you) 1561 1236 w (will) 1748 1236 w (typically) 1941 1236 w (read) 2328 1236 w (the) 2536 1236 w (row) 2695 1236 w (from) 2887 1236 w (the) 3118 1236 w (image) 3277 1236 w (file) 3558 1236 w (with) 3728 1236 w 10 /Times-Bold f (pnm) 3943 1236 w 10 /S f (_) 4138 1236 w 10 /Times-Bold f (readpamrown\(\)) 4188 1236 w 10 /Times-Roman f (and) 4896 1236 w (then) 720 1356 w (gamma\255correct) 921 1356 w (it) 1553 1356 w (with) 1638 1356 w 10 /Times-Bold f (pnm) 1845 1356 w 10 /S f (_) 2040 1356 w 10 /Times-Bold f (ungammarown\(\)) 2090 1356 w 10 /Times-Roman f (,) 2806 1356 w (and) 2860 1356 w (then) 3033 1356 w (do) 3234 1356 w 10 /Times-Bold f (pnm) 3363 1356 w 10 /S f (_) 3558 1356 w 10 /Times-Bold f (applyopacity\(\)) 3608 1356 w 10 /Times-Roman f (.) 4225 1356 w (You) 4304 1356 w (then) 4505 1356 w (manipu\255) 4707 1356 w (late) 720 1476 w (the) 947 1476 w (row) 1152 1476 w (further) 1390 1476 w (\(perhaps) 1744 1476 w (add) 2169 1476 w (it) 2395 1476 w (with) 2533 1476 w (other) 2793 1476 w (rows) 3080 1476 w (you've) 3356 1476 w (processed) 3715 1476 w (similarly\),) 4190 1476 w (then) 4686 1476 w (do) 4940 1476 w 10 /Times-Bold f (pnm) 720 1596 w 10 /S f (_) 915 1596 w 10 /Times-Bold f (unapplyopacity\(\)) 965 1596 w 10 /Times-Roman f (, then) 1694 1596 w 10 /Times-Bold f (pnm) 1941 1596 w 10 /S f (_) 2136 1596 w 10 /Times-Bold f (gammarown\(\)) 2186 1596 w 10 /Times-Roman f (, then) 2790 1596 w 10 /Times-Bold f (pnm) 3037 1596 w 10 /S f (_) 3232 1596 w 10 /Times-Bold f (writegammarown\(\)) 3282 1596 w 10 /Times-Roman f (.) 4107 1596 w 10 /Times-Bold f (pnm) 720 1752 w 10 /S f (_) 915 1752 w 10 /Times-Bold f (normalizeTuple\(\)) 965 1752 w 10 /Times-Roman f (and) 1744 1752 w 10 /Times-Bold f (pnm) 1924 1752 w 10 /S f (_) 2119 1752 w 10 /Times-Bold f (unnormalizeTuple\(\)) 2169 1752 w 10 /Times-Roman f (convert) 3061 1752 w (between) 3396 1752 w (a) 3764 1752 w 10 /Times-Bold f (tuple) 3844 1752 w 10 /Times-Roman f (data) 4097 1752 w (type) 4299 1752 w (and) 4507 1752 w (a) 4687 1752 w 10 /Times-Bold f (tuplen) 4767 1752 w 10 /Times-Roman f (data) 720 1872 w (type.) 913 1872 w (The) 1162 1872 w (former) 1344 1872 w (represents) 1642 1872 w (a) 2073 1872 w (sample) 2144 1872 w (value) 2453 1872 w (using) 2695 1872 w (the) 2938 1872 w (same) 3086 1872 w (unsigned) 3317 1872 w (integer) 3704 1872 w (that) 4007 1872 w (is) 4183 1872 w (in) 4276 1872 w (the) 4380 1872 w (PAM) 4528 1872 w (image,) 4771 1872 w (while) 720 1992 w (the) 990 1992 w (latter) 1160 1992 w (represents) 1413 1992 w (a) 1866 1992 w (sample) 1959 1992 w (value) 2291 1992 w (as) 2556 1992 w (a) 2688 1992 w (number) 2781 1992 w (scaled) 3135 1992 w (by) 3433 1992 w (the) 3582 1992 w (maxval) 3753 1992 w (to) 4096 1992 w (the) 4223 1992 w (range) 4394 1992 w (0..1.) 4664 1992 w (I.e.) 4913 1992 w 10 /Times-Bold f (pnm) 720 2112 w 10 /S f (_) 915 2112 w 10 /Times-Bold f (normalizeTuple\(\)) 965 2112 w 10 /Times-Roman f (divides) 1741 2112 w (every) 2062 2112 w (sample) 2315 2112 w (value) 2630 2112 w (by) 2878 2112 w (the) 3010 2112 w (maxval) 3163 2112 w (and) 3488 2112 w 10 /Times-Bold f (pnm) 3663 2112 w 10 /S f (_) 3858 2112 w 10 /Times-Bold f (unnormalizeTuple\(\)) 3908 2112 w 10 /Times-Roman f (multi\255) 4795 2112 w (ples every sample by the maxval.) 720 2232 w 10 /Times-Bold f (pnm) 720 2388 w 10 /S f (_) 915 2388 w 10 /Times-Bold f (normalizeRow\(\)) 965 2388 w 10 /Times-Roman f (and) 1688 2388 w 10 /Times-Bold f (pnm) 1868 2388 w 10 /S f (_) 2063 2388 w 10 /Times-Bold f (unnormalizeRow\(\)) 2113 2388 w 10 /Times-Roman f (do) 2948 2388 w (the) 3084 2388 w (same) 3243 2388 w (thing) 3485 2388 w (on) 3728 2388 w (an) 3865 2388 w (entire) 3996 2388 w (tuple) 4260 2388 w (row,) 4497 2388 w (but) 4714 2388 w (also) 4879 2388 w (have) 720 2508 w (an) 940 2508 w (extra) 1066 2508 w (feature:) 1297 2508 w (You) 1657 2508 w (can) 1860 2508 w (specify) 2029 2508 w (a) 2348 2508 w (transform) 2423 2508 w (function) 2842 2508 w (to) 3206 2508 w (be) 3315 2508 w (applied) 3440 2508 w (in) 3765 2508 w (addition.) 3874 2508 w (Typically,) 4283 2508 w (this) 4722 2508 w (is) 4898 2508 w (a) 4996 2508 w (gamma) 720 2628 w (transform) 1045 2628 w (function.) 1464 2628 w (You) 1878 2628 w (can) 2081 2628 w (of) 2250 2628 w (course) 2364 2628 w (more) 2655 2628 w (easily) 2891 2628 w (apply) 3156 2628 w (your) 3410 2628 w (transform) 3625 2628 w (function) 4045 2628 w (separately) 4410 2628 w (from) 4846 2628 w (normalizing,) 720 2748 w (but) 1258 2748 w (doing) 1416 2748 w (it) 1674 2748 w (all) 1760 2748 w (at) 1890 2748 w (once) 1992 2748 w (is) 2210 2748 w (usually) 2307 2748 w (way) 2626 2748 w (faster.) 2822 2748 w (Why?) 3123 2748 w (Because) 3416 2748 w (you) 3778 2748 w (can) 3958 2748 w (use) 4125 2748 w (a) 4287 2748 w (lookup) 4360 2748 w (table) 4667 2748 w (that) 4890 2748 w (is indexed by) 720 2868 w (an) 1279 2868 w (integer) 1399 2868 w (on) 1702 2868 w (one) 1828 2868 w (side) 1998 2868 w (and) 2185 2868 w (produces) 2355 2868 w (a) 2741 2868 w (floating) 2811 2868 w (point) 3148 2868 w (number) 3380 2868 w (on) 3711 2868 w (the) 3837 2868 w (other.) 3985 2868 w (To) 4266 2868 w (do) 4403 2868 w (it) 4529 2868 w (separately,) 4611 2868 w (you'd) 720 2988 w (either) 981 2988 w (have) 1236 2988 w (to) 1452 2988 w (do) 1558 2988 w (floating) 1686 2988 w (point) 2025 2988 w (arithmetic) 2259 2988 w (on) 2691 2988 w (the) 2818 2988 w (normalized) 2967 2988 w (value) 3443 2988 w (or) 3686 2988 w (do) 3796 2988 w (the) 3923 2988 w (transform) 4072 2988 w (on) 4487 2988 w (the) 4614 2988 w (integer) 4763 2988 w (values and lose a lot of precision.) 720 3108 w (If) 720 3264 w (you) 812 3264 w (don't) 988 3264 w (have) 1225 3264 w (any) 1439 3264 w (transformation) 1609 3264 w (to) 2223 3264 w (apply,) 2327 3264 w (just) 2600 3264 w (specify) 2772 3264 w 10 /Times-Bold f (NULL) 3087 3264 w 10 /Times-Roman f (for) 3392 3264 w (the) 3535 3264 w 10 /Times-Italic f (transform) 3684 3264 w 10 /Times-Roman f (argument) 4106 3264 w (and) 4510 3264 w (the) 4681 3264 w (func\255) 4830 3264 w (tion will just normalize \(i.e. divide or multiply by the maxval\).) 720 3384 w (Here's) 720 3540 w (an) 1012 3540 w (example) 1134 3540 w (of) 1500 3540 w (doing) 1611 3540 w (a) 1867 3540 w (transformation.) 1939 3540 w (The) 2605 3540 w (example) 2788 3540 w (composes) 3154 3540 w (two) 3576 3540 w (images) 3754 3540 w (together,) 4065 3540 w (something) 4445 3540 w (that) 4890 3540 w (has to be done with intensity\255linear sample values.) 720 3660 w (pnm) 720 3840 w 10 /S f (_) 898 3840 w 10 /Times-Roman f (transformMap * const transform1 = pnm) 948 3840 w 10 /S f (_) 2577 3840 w 10 /Times-Roman f (createungammatransform\(&inpam1\);) 2627 3840 w (pnm) 720 3960 w 10 /S f (_) 898 3960 w 10 /Times-Roman f (transformMap * const transform2 = pnm) 948 3960 w 10 /S f (_) 2577 3960 w 10 /Times-Roman f (createungammatransform\(&inpam2\);) 2627 3960 w (pnm) 720 4080 w 10 /S f (_) 898 4080 w 10 /Times-Roman f (transformMap * const transformOut = pnm) 948 4080 w 10 /S f (_) 2677 4080 w 10 /Times-Roman f (creategammatransform\(&outpam\);) 2727 4080 w (pnm) 720 4200 w 10 /S f (_) 898 4200 w 10 /Times-Roman f (readpamrow\(&inpam1, inrow1\);) 948 4200 w (pnm) 720 4320 w 10 /S f (_) 898 4320 w 10 /Times-Roman f (readpamrow\(&inpam2, inrow2\);) 948 4320 w (pnm) 720 4440 w 10 /S f (_) 898 4440 w 10 /Times-Roman f (normalizeRow\(&inpam1, inrow1, transform1, normInrow1\);) 948 4440 w (pnm) 720 4560 w 10 /S f (_) 898 4560 w 10 /Times-Roman f (normalizeRow\(&inpam2, inrow2, transform2, normInrow2\);) 948 4560 w (for \(col = 0; col < outpam.width; ++col\)) 720 4680 w (normOutrow[col] = \(normInrow1[col] + normInrow2[col]\)/2;) 820 4800 w (pnm) 720 4920 w 10 /S f (_) 898 4920 w 10 /Times-Roman f (unnormalizeRow\(&outpam, normOutrow, transformOut, outrow\);) 948 4920 w (pnm) 720 5040 w 10 /S f (_) 898 5040 w 10 /Times-Roman f (writepamrow\(&outpam, outrow\);) 948 5040 w (To) 720 5256 w (specify) 860 5256 w (a) 1177 5256 w (transform,) 1250 5256 w (you) 1692 5256 w (must) 1871 5256 w (create) 2095 5256 w (a) 2361 5256 w (special) 2434 5256 w 10 /Times-Bold f (pnm) 2740 5256 w 10 /S f (_) 2935 5256 w 10 /Times-Bold f (transformMap) 2985 5256 w 10 /Times-Roman f (object) 3646 5256 w (and) 3919 5256 w (pass) 4092 5256 w (it) 4294 5256 w (as) 4380 5256 w (the) 4493 5256 w 10 /Times-Italic f (transform) 4645 5256 w 10 /Times-Roman f (argument.) 720 5376 w (Typically,) 1185 5376 w (your) 1631 5376 w (transform) 1852 5376 w (is) 2278 5376 w (a) 2383 5376 w (gamma) 2464 5376 w (transformation) 2795 5376 w (because) 3420 5376 w (you) 3772 5376 w (want) 3959 5376 w (to) 4190 5376 w (work) 4305 5376 w (in) 4547 5376 w (intensity\255) 4662 5376 w (proportional) 720 5496 w (sample) 1248 5496 w (values) 1565 5496 w (and) 1855 5496 w (the) 2034 5496 w (PAM) 2191 5496 w (image) 2443 5496 w (format) 2722 5496 w (uses) 3023 5496 w (gamma\255adjusted) 3230 5496 w (ones.) 3925 5496 w (In) 4193 5496 w (that) 4311 5496 w (case,) 4496 5496 w (just) 4727 5496 w (use) 4907 5496 w 10 /Times-Bold f (pnm) 720 5616 w 10 /S f (_) 915 5616 w 10 /Times-Bold f (creategammtransform\(\)) 965 5616 w 10 /Times-Roman f (and) 2041 5616 w 10 /Times-Bold f (pnm) 2238 5616 w 10 /S f (_) 2433 5616 w 10 /Times-Bold f (createungammatransform\(\)) 2483 5616 w 10 /Times-Roman f (to) 3721 5616 w (create) 3851 5616 w (this) 4140 5616 w (object) 4337 5616 w (and) 4633 5616 w (don't) 4829 5616 w (worry about what's inside it.) 720 5736 w 10 /Times-Bold f (pnm) 720 5892 w 10 /S f (_) 915 5892 w 10 /Times-Bold f (creategammatransform\(\)) 965 5892 w 10 /Times-Roman f (and) 2075 5892 w 10 /Times-Bold f (pnm) 2256 5892 w 10 /S f (_) 2451 5892 w 10 /Times-Bold f (createungammatransform\(\)) 2501 5892 w 10 /Times-Roman f (create) 3723 5892 w (objects) 3997 5892 w (that) 4317 5892 w (you) 4504 5892 w (use) 4691 5892 w (with) 4862 5892 w 10 /Times-Bold f (pnm) 720 6012 w 10 /S f (_) 915 6012 w 10 /Times-Bold f (normalizeRow\(\)) 965 6012 w 10 /Times-Roman f (and) 1687 6012 w 10 /Times-Bold f (pnm) 1866 6012 w 10 /S f (_) 2061 6012 w 10 /Times-Bold f (unnormalizeRow\(\)) 2111 6012 w 10 /Times-Roman f (as) 2945 6012 w (described) 3063 6012 w (above.) 3480 6012 w (The) 3803 6012 w (created) 3992 6012 w (object) 4313 6012 w (describes) 4591 6012 w (a) 4996 6012 w (transform) 720 6132 w (that) 1142 6132 w (applies) 1326 6132 w (or) 1643 6132 w (reverses) 1760 6132 w (the) 2120 6132 w (ITU\255R) 2276 6132 w (Recommendation) 2576 6132 w (BT.709) 3316 6132 w (gamma) 3654 6132 w (adjustment) 3983 6132 w (that) 4457 6132 w (is) 4642 6132 w (used) 4744 6132 w (in) 4962 6132 w (PAM) 720 6252 w (visual) 965 6252 w (images) 1232 6252 w (and) 1543 6252 w (normalizes) 1714 6252 w (or) 2179 6252 w (unnormalizes) 2289 6252 w (the) 2854 6252 w (sample) 3003 6252 w (values.) 3313 6252 w 10 /Times-Bold f (pnm) 3645 6252 w 10 /S f (_) 3840 6252 w 10 /Times-Bold f (freegammatransform\(\)) 3890 6252 w 10 /Times-Roman f (and) 4896 6252 w 10 /Times-Bold f (pnm) 720 6372 w 10 /S f (_) 915 6372 w 10 /Times-Bold f (freeungammatransform\(\)) 965 6372 w 10 /Times-Roman f (destroy the objects.) 2081 6372 w 10 /Times-Bold f (Miscellaneous) 720 6612 w cleartomark showpage saveobj restore %%EndPage: 6 6 %%Page: 7 7 /saveobj save def mark 7 pagesetup 10 /Times-Roman f (\255 7 \255) 2797 480 w 10 /Times-Bold f (Synopsis) 720 840 w (void) 720 1032 w (pnm) 998 1032 w 10 /S f (_) 1193 1032 w 10 /Times-Bold f (checkpam\() 1243 1032 w (struct) 1803 1032 w (pam) 2146 1032 w (*) 2429 1032 w 10 /Times-Italic f (pamP) 2479 1032 w 10 /Times-Bold f (,) 2712 1032 w (const) 2831 1032 w (enum) 3147 1032 w (pm) 3480 1032 w 10 /S f (_) 3619 1032 w 10 /Times-Bold f (check) 3669 1032 w 10 /S f (_) 3913 1032 w 10 /Times-Bold f (type) 3963 1032 w 10 /Times-Italic f (check) 4240 1032 w 10 /S f (_) 4466 1032 w 10 /Times-Italic f (type) 4516 1032 w 10 /Times-Bold f (,) 4682 1032 w (enum) 4801 1032 w (pm) 720 1152 w 10 /S f (_) 859 1152 w 10 /Times-Bold f (check) 909 1152 w 10 /S f (_) 1153 1152 w 10 /Times-Bold f (code *) 1203 1152 w 10 /Times-Italic f (retvalP) 1472 1152 w 10 /Times-Bold f (\);) 1766 1152 w (void pnm) 720 1308 w 10 /S f (_) 1124 1308 w 10 /Times-Bold f (nextimage\( FILE *) 1174 1308 w 10 /Times-Italic f (file) 1979 1308 w 10 /Times-Bold f (, int * const) 2107 1308 w 10 /Times-Italic f (eofP) 2621 1308 w 10 /Times-Bold f (\);) 2804 1308 w (Description) 720 1548 w (pnm) 720 1740 w 10 /S f (_) 915 1740 w 10 /Times-Bold f (checkpam\(\)) 965 1740 w 10 /Times-Roman f (checks) 1491 1740 w (for) 1789 1740 w (the) 1932 1740 w (common) 2081 1740 w (file) 2458 1740 w (integrity) 2618 1740 w (error) 2984 1740 w (where) 3204 1740 w (the) 3474 1740 w (file) 3623 1740 w (is) 3783 1740 w (the) 3877 1740 w (wrong) 4026 1740 w (size) 4308 1740 w (to) 4490 1740 w (contain) 4596 1740 w (the) 4918 1740 w (raster, according to the information in the header.) 720 1860 w 10 /Times-Bold f (pnm) 720 2016 w 10 /S f (_) 915 2016 w 10 /Times-Bold f (nextimage\(\)) 965 2016 w 10 /Times-Roman f (positions) 1469 2016 w (a) 1881 2016 w (Netpbm) 1975 2016 w (image) 2347 2016 w (input) 2641 2016 w (file) 2897 2016 w (to) 3080 2016 w (the) 3208 2016 w (next) 3380 2016 w (image) 3602 2016 w (in) 3896 2016 w (it) 4024 2016 w (\(so) 4130 2016 w (that) 4302 2016 w (a) 4502 2016 w (subsequent) 4596 2016 w 10 /Times-Bold f (pnm) 720 2136 w 10 /S f (_) 915 2136 w 10 /Times-Bold f (readpaminit\(\)) 965 2136 w 10 /Times-Roman f (reads its header\).) 1584 2136 w 10 /S1 f (________________________________________________________________________) 720 2256 w 10 /Times-Bold f (Table Of Contents) 720 2496 w 10 /LucidaSansUnicode22 f (\031) 720 2688 w 10 /Times-Roman f (Types) 970 2688 w 10 /LucidaSansUnicode22 f (\031) 720 2844 w 10 /Times-Roman f (Macros) 970 2844 w 10 /LucidaSansUnicode22 f (\031) 720 3000 w 10 /Times-Roman f (Functions) 970 3000 w 10 /LucidaSansUnicode22 f (\031) 720 3156 w 10 /Times-Roman f (Memory Management) 970 3156 w 10 /LucidaSansUnicode22 f (\031) 720 3312 w 10 /Times-Roman f (Reading Netpbm Files) 970 3312 w 10 /LucidaSansUnicode22 f (\031) 720 3468 w 10 /Times-Roman f (Writing Netpbm Files) 970 3468 w 10 /LucidaSansUnicode22 f (\031) 720 3624 w 10 /Times-Roman f (Transforming Pixels) 970 3624 w 10 /LucidaSansUnicode22 f (\031) 720 3780 w 10 /Times-Roman f (Miscellaneous) 970 3780 w cleartomark showpage saveobj restore %%EndPage: 7 7 %%Trailer done %%DocumentFonts: Times-Roman LucidaSansUnicode20 LucidaSansUnicode22 Times-Italic Times-Bold S1 S %%Pages: 7