%!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 (Pgmtoppm) 2246 1230 w (User) 2843 1230 w (Manual) 3112 1230 w 10 /Times-Bold f (pgmtoppm) 720 1920 w 10 /Times-Roman f (Updated: 24 January 2001) 720 2076 w (Table Of Contents) 720 2196 w 10 /Times-Bold f (NAME) 720 2436 w 10 /Times-Roman f (pgmtoppm \255 colorize a PGM \(grayscale\) image into a PPM \(color\) image) 720 2592 w 10 /Times-Bold f (SYNOPSIS) 720 2832 w (pgmtoppm) 720 2988 w 10 /Times-Italic f (colorspec) 1212 2988 w 10 /Times-Roman f ([) 1625 2988 w 10 /Times-Italic f (pgmfile) 1658 2988 w 10 /Times-Roman f (]) 1958 2988 w 10 /Times-Bold f (pgmtoppm) 720 3108 w 10 /Times-Italic f (colorspec1) 1212 3108 w 10 /Times-Bold f (\255) 1650 3108 w 10 /Times-Italic f (colorspec2) 1683 3108 w 10 /Times-Roman f ([) 2146 3108 w 10 /Times-Italic f (pgmfile) 2179 3108 w 10 /Times-Roman f (]) 2479 3108 w 10 /Times-Bold f (pgmtoppm \255map) 720 3228 w 10 /Times-Italic f (mapfile) 1459 3228 w 10 /Times-Roman f ([) 1784 3228 w 10 /Times-Italic f (pgmfile) 1817 3228 w 10 /Times-Roman f (]) 2117 3228 w 10 /Times-Bold f (DESCRIPTION) 720 3468 w 10 /Times-Roman f (This program is part of Netpbm.) 720 3660 w 10 /Times-Bold f (pgmtoppm) 720 3816 w 10 /Times-Roman f (reads) 1214 3816 w (a) 1452 3816 w (PGM) 1524 3816 w (as) 1769 3816 w (input) 1880 3816 w (and) 2114 3816 w (produces) 2286 3816 w (a) 2674 3816 w (PPM) 2746 3816 w (file) 2975 3816 w (as) 3136 3816 w (output) 3247 3816 w (with) 3531 3816 w (a) 3737 3816 w (specific) 3809 3816 w (color) 4147 3816 w (assigned) 4380 3816 w (to) 4752 3816 w (each) 4858 3816 w (gray value in the input.) 720 3936 w (If) 720 4092 w (you) 813 4092 w (specify) 990 4092 w (one) 1305 4092 w (color) 1476 4092 w (argument,) 1708 4092 w (black) 2137 4092 w (in) 2380 4092 w (the) 2485 4092 w (pgm) 2634 4092 w (file) 2839 4092 w (stays) 2999 4092 w (black) 3226 4092 w (and) 3469 4092 w (white) 3640 4092 w (in) 3889 4092 w (the) 3994 4092 w (pgm) 4143 4092 w (file) 4348 4092 w (turns) 4508 4092 w (into) 4735 4092 w (the) 4918 4092 w (specified) 720 4212 w (color) 1113 4212 w (in) 1351 4212 w (the) 1462 4212 w (ppm) 1617 4212 w (file.) 1828 4212 w (Gray) 2044 4212 w (values) 2275 4212 w (in) 2562 4212 w (between) 2672 4212 w (are) 3036 4212 w (linearly) 3189 4212 w (mapped) 3526 4212 w (to) 3874 4212 w (differing) 3984 4212 w (intensities) 4365 4212 w (of) 4803 4212 w (the) 4918 4212 w (specified color.) 720 4332 w (If) 720 4488 w (you) 823 4488 w (specify) 1010 4488 w (two) 1335 4488 w (color) 1522 4488 w (arguments) 1764 4488 w (\(separated) 2217 4488 w (by) 2663 4488 w (a) 2800 4488 w (dash\),) 2882 4488 w (then) 3161 4488 w (black) 3371 4488 w (gets) 3625 4488 w (mapped) 3824 4488 w (to) 4178 4488 w (the) 4294 4488 w (first) 4454 4488 w (color) 4653 4488 w (and) 4896 4488 w (white) 720 4608 w (gets) 978 4608 w (mapped) 1175 4608 w (to) 1527 4608 w (the) 1641 4608 w (second) 1799 4608 w (and) 2112 4608 w (gray) 2292 4608 w (values) 2505 4608 w (in) 2796 4608 w (between) 2910 4608 w (get) 3278 4608 w (mapped) 3436 4608 w (linearly) 3787 4608 w (\(across) 4127 4608 w (a) 4444 4608 w (three) 4523 4608 w (dimen\255) 4757 4608 w (sional space\) to colors in between.) 720 4728 w (Specify the color \() 720 4884 w 10 /Times-Italic f (color) 1460 4884 w 10 /Times-Roman f (\) as described for the argument of the) 1671 4884 w 10 /Times-Bold f (ppm) 3189 4884 w 10 /S f (_) 3384 4884 w 10 /Times-Bold f (parsecolor\(\)) 3434 4884 w 10 /Times-Roman f (library routine.) 3974 4884 w (Also,) 720 5040 w (you) 966 5040 w (can) 1148 5040 w (specify) 1318 5040 w (an) 1638 5040 w (entire) 1764 5040 w (colormap) 2023 5040 w (with) 2432 5040 w (the) 2642 5040 w 10 /Times-Bold f (\255map) 2796 5040 w 10 /Times-Roman f (option.) 3050 5040 w (The) 3388 5040 w (mapfile) 3575 5040 w (is) 3912 5040 w (just) 4011 5040 w (a) 4188 5040 w 10 /Times-Bold f (ppm) 4264 5040 w 10 /Times-Roman f (file;) 4492 5040 w (it) 4686 5040 w (can) 4775 5040 w (be) 4946 5040 w (any) 720 5160 w (shape,) 896 5160 w (all) 1180 5160 w (that) 1312 5160 w (matters) 1494 5160 w (is) 1820 5160 w (the) 1919 5160 w (colors) 2073 5160 w (in) 2349 5160 w (it) 2459 5160 w (and) 2547 5160 w (their) 2723 5160 w (order.) 2938 5160 w (In) 3230 5160 w (this) 3345 5160 w (case,) 3522 5160 w (black) 3750 5160 w (gets) 3998 5160 w (mapped) 4191 5160 w (into) 4539 5160 w (the) 4726 5160 w (first) 4879 5160 w (color) 720 5280 w (in) 960 5280 w (the) 1073 5280 w (map) 1230 5280 w (file,) 1437 5280 w (and) 1630 5280 w (white) 1809 5280 w (gets) 2066 5280 w (mapped) 2262 5280 w (to) 2613 5280 w (the) 2727 5280 w (last) 2885 5280 w (and) 3060 5280 w (gray) 3240 5280 w (values) 3453 5280 w (in) 3744 5280 w (between) 3858 5280 w (are) 4226 5280 w (mapped) 4383 5280 w (linearly) 4735 5280 w (onto the sequence of colors in between.) 720 5400 w (A) 720 5556 w (more) 823 5556 w (direct) 1059 5556 w (way) 1317 5556 w (to) 1514 5556 w (specify) 1623 5556 w (a) 1942 5556 w (particular) 2017 5556 w (color) 2430 5556 w (to) 2666 5556 w (replace) 2775 5556 w (each) 3093 5556 w (particular) 3307 5556 w (gray) 3721 5556 w (level) 3930 5556 w (is) 4156 5556 w (to) 4255 5556 w (use) 4365 5556 w 10 /Times-Bold f (pamlookup) 4530 5556 w 10 /Times-Roman f (.) 5015 5556 w (You make an index file that explicitly associates a color with each possible gray level.) 720 5676 w 10 /Times-Bold f (NOTE \255 MAXVAL) 720 5916 w 10 /Times-Roman f (The) 720 6108 w ("maxval,") 903 6108 w (or) 1332 6108 w (depth,) 1443 6108 w (of) 1718 6108 w (the) 1829 6108 w (output) 1979 6108 w (image) 2263 6108 w (is) 2535 6108 w (the) 2630 6108 w (same) 2780 6108 w (as) 3013 6108 w (that) 3124 6108 w (of) 3302 6108 w (the) 3413 6108 w (input) 3563 6108 w (image.) 3797 6108 w (The) 4119 6108 w (maxval) 4302 6108 w (affects) 4624 6108 w (the) 4918 6108 w (color) 720 6228 w (resolution,) 962 6228 w (which) 1424 6228 w (may) 1705 6228 w (cause) 1914 6228 w (quantization) 2172 6228 w (errors) 2702 6228 w (you) 2970 6228 w (don't) 3156 6228 w (anticipate) 3403 6228 w (in) 3827 6228 w (your) 3941 6228 w (output.) 4160 6228 w (For) 4502 6228 w (example,) 4677 6228 w (you) 720 6348 w (have) 903 6348 w (a) 1124 6348 w (simple) 1201 6348 w (black) 1501 6348 w (and) 1750 6348 w (white) 1927 6348 w (image) 2182 6348 w (as) 2459 6348 w (a) 2575 6348 w (PGM) 2652 6348 w (with) 2902 6348 w (maxval) 3113 6348 w (1.) 3440 6348 w (Run) 3573 6348 w (this) 3773 6348 w (image) 3951 6348 w (through) 4228 6348 w 10 /Times-Bold f (pgmtoppm) 4573 6348 w (0f/00/00) 720 6468 w 10 /Times-Roman f (to) 1090 6468 w (try) 1199 6468 w (to) 1341 6468 w (make) 1450 6468 w (the) 1697 6468 w (image) 1850 6468 w (black) 2125 6468 w (and) 2372 6468 w (faint) 2547 6468 w (red.) 2761 6468 w (Because) 2969 6468 w (the) 3332 6468 w (output) 3485 6468 w (image) 3772 6468 w (will) 4046 6468 w (also) 4232 6468 w (have) 4423 6468 w (maxval) 4641 6468 w (1,) 4965 6468 w (there) 720 6588 w (is) 954 6588 w (no) 1056 6588 w (such) 1191 6588 w (thing) 1409 6588 w (as) 1650 6588 w (faint) 1769 6588 w (red.) 1988 6588 w (It) 2201 6588 w (has) 2298 6588 w (to) 2467 6588 w (be) 2581 6588 w (either) 2711 6588 w (full\255on) 2974 6588 w (red) 3282 6588 w (or) 3445 6588 w (black.) 3564 6588 w 10 /Times-Bold f (pgmtoppm) 3866 6588 w 10 /Times-Roman f (rounds) 4369 6588 w (the) 4677 6588 w (color) 4835 6588 w (0f/00/00 down to black, and you get an output image that is nothing but black.) 720 6708 w (The fix is easy: Pass the input through) 720 6864 w 10 /Times-Bold f (pamdepth) 2275 6864 w 10 /Times-Roman f (on the way into) 2734 6864 w 10 /Times-Bold f (pgmtoppm) 3378 6864 w 10 /Times-Roman f (to increase its depth) 3870 6864 w (to) 4692 6864 w (some\255) 4796 6864 w (thing) 720 6984 w (that) 962 6984 w (would) 1148 6984 w (give) 1434 6984 w (you) 1642 6984 w (the) 1828 6984 w (resolution) 1986 6984 w (you) 2422 6984 w (need) 2608 6984 w (to) 2832 6984 w (get) 2946 6984 w (your) 3104 6984 w (desired) 3323 6984 w (color.) 3647 6984 w (In) 3938 6984 w (this) 4057 6984 w (case,) 4238 6984 w 10 /Times-Bold f (pamdepth) 4470 6984 w (16) 4940 6984 w 10 /Times-Roman f (would do it.) 720 7104 w (Or spare yourself the unnecessary thinking and just say) 1251 7104 w 10 /Times-Bold f (pamdepth 255) 3483 7104 w 10 /Times-Roman f (.) 4092 7104 w (PBM) 720 7260 w (input) 968 7260 w (is) 1210 7260 w (a) 1313 7260 w (special) 1393 7260 w (case.) 1706 7260 w (While) 1963 7260 w (you) 2243 7260 w (might) 2429 7260 w (think) 2699 7260 w (this) 2941 7260 w (would) 3123 7260 w (be) 3410 7260 w (equivalent) 3541 7260 w (to) 3994 7260 w (a) 4109 7260 w (PGM) 4190 7260 w (with) 4444 7260 w (maxval) 4659 7260 w (1) 4990 7260 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 (since) 720 840 w (only) 953 840 w (two) 1159 840 w (gray) 1337 840 w (levels) 1541 840 w (are) 1801 840 w (necessary) 1949 840 w (to) 2363 840 w (represent) 2468 840 w (a) 2860 840 w (PBM) 2931 840 w (image,) 3170 840 w 10 /Times-Bold f (pgmtoppm) 3466 840 w 10 /Times-Roman f (,) 3933 840 w (like) 3985 840 w (all) 4162 840 w (Netpbm) 4289 840 w (programs,) 4638 840 w (in fact treats it as a maxval of 255.) 720 960 w 10 /Times-Bold f (SEE ALSO) 720 1200 w (pamdepth) 720 1356 w 10 /Times-Roman f (,) 1154 1356 w 10 /Times-Bold f (rgb3toppm) 1204 1356 w 10 /Times-Roman f (,) 1682 1356 w 10 /Times-Bold f (ppmtopgm) 1732 1356 w 10 /Times-Roman f (,) 2199 1356 w 10 /Times-Bold f (ppmtorgb3) 2249 1356 w 10 /Times-Roman f (,) 2727 1356 w 10 /Times-Bold f (ppm) 2777 1356 w 10 /Times-Roman f (,) 2972 1356 w 10 /Times-Bold f (pgm) 3022 1356 w (AUTHOR) 720 1596 w 10 /Times-Roman f (Copyright \(C\) 1991 by Jef Poskanzer.) 720 1752 w 10 /S1 f (________________________________________________________________________) 720 1872 w 10 /Times-Bold f (Table Of Contents) 720 2112 w 10 /LucidaSansUnicode22 f (\031) 720 2304 w 10 /Times-Roman f (NAME) 970 2304 w 10 /LucidaSansUnicode22 f (\031) 720 2460 w 10 /Times-Roman f (SYNOPSIS) 970 2460 w 10 /LucidaSansUnicode22 f (\031) 720 2616 w 10 /Times-Roman f (DESCRIPTION) 970 2616 w 10 /LucidaSansUnicode22 f (\031) 720 2772 w 10 /Times-Roman f (NOTE \255 MAXVAL) 970 2772 w 10 /LucidaSansUnicode22 f (\031) 720 2928 w 10 /Times-Roman f (SEE ALSO) 970 2928 w 10 /LucidaSansUnicode22 f (\031) 720 3084 w 10 /Times-Roman f (AUTHOR) 970 3084 w cleartomark showpage saveobj restore %%EndPage: 2 2 %%Trailer done %%DocumentFonts: Times-Roman LucidaSansUnicode22 Times-Italic Times-Bold S1 S %%Pages: 2