%!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 (Pnmremap User) 2243 1230 w (Manual) 3115 1230 w 10 /Times-Bold f (pnmremap) 720 1920 w 10 /Times-Roman f (Updated: 01 January 2002) 720 2076 w (Table Of Contents) 720 2196 w 10 /Times-Bold f (NAME) 720 2436 w 10 /Times-Roman f (pnmremap \255 replace colors in a PNM image with colors from another set) 720 2592 w 10 /Times-Bold f (SYNOPSIS) 720 2832 w (pnmremap) 720 2988 w (\255mapfile=) 1355 2988 w 10 /Times-Italic f (palettefile) 1767 2988 w 10 /Times-Roman f ([) 2330 2988 w 10 /Times-Bold f (\255floyd) 2363 2988 w 10 /S f (\357) 2613 2988 w 10 /Times-Bold f (\255fs) 2662 2988 w 10 /S f (\357) 2767 2988 w 10 /Times-Bold f (\255nfloyd) 2816 2988 w 10 /S f (\357) 3122 2988 w 10 /Times-Bold f (\255nofs) 3171 2988 w 10 /Times-Roman f (]) 3382 2988 w ([) 3578 2988 w 10 /Times-Bold f (\255firstisdefault) 3611 2988 w 10 /Times-Roman f (]) 4188 2988 w ([) 4384 2988 w 10 /Times-Bold f (\255verbose) 4417 2988 w 10 /Times-Roman f (]) 4777 2988 w ([) 4974 2988 w 10 /Times-Bold f (\255) 5007 2988 w (missingcolor=) 720 3108 w 10 /Times-Italic f (color) 1316 3108 w 10 /Times-Roman f (] [) 1527 3108 w 10 /Times-Italic f (pnmfile) 1618 3108 w 10 /Times-Roman f (]) 1918 3108 w (All) 720 3264 w (options) 876 3264 w (can) 1199 3264 w (be) 1366 3264 w (abbreviated) 1489 3264 w (to) 1983 3264 w (their) 2090 3264 w (shortest) 2302 3264 w (unique) 2642 3264 w (prefix.) 2943 3264 w (You) 3260 3264 w (may) 3461 3264 w (use) 3662 3264 w (two) 3824 3264 w (hyphens) 4003 3264 w (instead) 4365 3264 w (of) 4677 3264 w (one) 4789 3264 w (to) 4962 3264 w (designate) 720 3384 w (an) 1134 3384 w (option.) 1265 3384 w (You) 1608 3384 w (may) 1817 3384 w (use) 2026 3384 w (either) 2196 3384 w (white) 2460 3384 w (space) 2719 3384 w (or) 2977 3384 w (an) 3097 3384 w (equals) 3228 3384 w (sign) 3520 3384 w (between) 3723 3384 w (an) 4091 3384 w (option) 4221 3384 w (name) 4513 3384 w (and) 4765 3384 w (its) 4945 3384 w (value.) 720 3504 w 10 /Times-Bold f (DESCRIPTION) 720 3744 w 10 /Times-Roman f (This program is part of Netpbm.) 720 3936 w 10 /Times-Bold f (pnmremap) 720 4092 w 10 /Times-Roman f (replaces) 1225 4092 w (the) 1584 4092 w (colors) 1739 4092 w (in) 2016 4092 w (an) 2127 4092 w (input) 2254 4092 w (image) 2493 4092 w (with) 2770 4092 w (those) 2981 4092 w (from) 3225 4092 w (a) 3452 4092 w (palette) 3529 4092 w (you) 3829 4092 w (specify.) 4013 4092 w (Where) 4385 4092 w (colors) 4684 4092 w (in) 4962 4092 w (the) 720 4212 w (input) 877 4212 w (are) 1118 4212 w (present) 1274 4212 w (in) 1597 4212 w (the) 1710 4212 w (palette,) 1867 4212 w (they) 2193 4212 w (just) 2400 4212 w (stay) 2579 4212 w (the) 2774 4212 w (same) 2930 4212 w (in) 3169 4212 w (the) 3281 4212 w (output.) 3437 4212 w (But) 3777 4212 w (where) 3956 4212 w (the) 4233 4212 w (input) 4389 4212 w (contains) 4629 4212 w (a) 4996 4212 w (color) 720 4332 w (that) 960 4332 w (is) 1145 4332 w (not) 1247 4332 w (in) 1411 4332 w (the) 1525 4332 w (palette,) 1683 4332 w 10 /Times-Bold f (pnmremap) 2010 4332 w 10 /Times-Roman f (gives) 2518 4332 w (you) 2765 4332 w (three) 2951 4332 w (choices:) 3186 4332 w (1\)) 3549 4332 w (choose) 3668 4332 w (the) 3981 4332 w (closest) 4139 4332 w (color) 4447 4332 w (from) 4688 4332 w (the) 4918 4332 w (palette; 2\) choose the first color from the palette; 3\) use a color specified by a command option.) 720 4452 w (You) 720 4608 w (can) 930 4608 w (also) 1106 4608 w (dither,) 1305 4608 w (which) 1601 4608 w (means) 1883 4608 w (rather) 2176 4608 w (than) 2446 4608 w (mapping) 2656 4608 w (pixel) 3044 4608 w (by) 3282 4608 w (pixel,) 3420 4608 w 10 /Times-Bold f (pnmremap) 3683 4608 w 10 /Times-Roman f (uses) 4193 4608 w (colors) 4403 4608 w (from) 4685 4608 w (the) 4918 4608 w (palette) 720 4728 w (to) 1012 4728 w (try) 1116 4728 w (to) 1253 4728 w (make) 1357 4728 w (multi\255pixel) 1599 4728 w (regions) 2070 4728 w (of) 2390 4728 w (the output have the same average color as the input \(for another) 2499 4728 w (kind of dithering, see) 720 4848 w 10 /Times-Bold f (ppmdither) 1594 4848 w 10 /Times-Roman f (\).) 2050 4848 w (Two) 720 5004 w (reasons) 929 5004 w (to) 1255 5004 w (use) 1360 5004 w (this) 1520 5004 w (program) 1692 5004 w (are:) 2057 5004 w (1\)) 2233 5004 w (you) 2343 5004 w (want) 2520 5004 w (to) 2741 5004 w (reduce) 2846 5004 w (the) 3138 5004 w (number) 3287 5004 w (of) 3619 5004 w (colors) 3729 5004 w (in) 4000 5004 w (the) 4105 5004 w (input) 4254 5004 w (image;) 4487 5004 w (and) 4786 5004 w (2\)) 4957 5004 w (you need to feed the image to something that can handle only certain colors.) 720 5124 w (To reduce colors, you can generate the palette with) 720 5280 w 10 /Times-Bold f (pnmcolormap) 2781 5280 w 10 /Times-Roman f (.) 3381 5280 w (By) 720 5436 w (default,) 877 5436 w 10 /Times-Bold f (pnmremap) 1219 5436 w 10 /Times-Roman f (maps) 1731 5436 w (an) 1982 5436 w (input) 2116 5436 w (color) 2362 5436 w (that) 2607 5436 w (is) 2797 5436 w (not) 2904 5436 w (in) 3072 5436 w (the) 3190 5436 w (palette) 3352 5436 w (to) 3659 5436 w (the) 3778 5436 w (closest) 3941 5436 w (color) 4254 5436 w (that) 4500 5436 w (is) 4691 5436 w (in) 4799 5436 w (the) 4918 5436 w (palette.) 720 5556 w (Closest) 1062 5556 w (means) 1383 5556 w (with) 1664 5556 w (the) 1868 5556 w (smallest) 2016 5556 w (cartesian) 2370 5556 w (distance in the red, green, blue brightness space \(smallest) 2750 5556 w (sum) 720 5676 w (of) 929 5676 w (the) 1054 5676 w (squares) 1218 5676 w (of) 1559 5676 w (the) 1684 5676 w (differences) 1848 5676 w (in) 2332 5676 w (red,) 2452 5676 w (greeN,) 2647 5676 w (and) 2958 5676 w (blue) 3145 5676 w (ITU\255R) 3360 5676 w (Recommedation) 3669 5676 w (BT.709) 4367 5676 w (gamma\255) 4713 5676 w (adjusted intensities\).) 720 5796 w (You) 720 5952 w (can) 919 5952 w (instead) 1084 5952 w (specify) 1394 5952 w (a) 1709 5952 w (single) 1780 5952 w (default) 2046 5952 w (color) 2350 5952 w (for) 2582 5952 w 10 /Times-Bold f (pnmremap) 2725 5952 w 10 /Times-Roman f (to) 3224 5952 w (use) 3329 5952 w (for) 3489 5952 w (any) 3632 5952 w (color) 3803 5952 w (in) 4035 5952 w (the) 4140 5952 w (input) 4289 5952 w (image) 4523 5952 w (that) 4795 5952 w (is) 4973 5952 w (not in the palette.) 720 6072 w (Use the) 1464 6072 w 10 /Times-Bold f (\255missing) 1791 6072 w 10 /Times-Roman f (option for this.) 2172 6072 w (You) 720 6228 w (can) 924 6228 w (also) 1094 6228 w (specify) 1287 6228 w (that) 1607 6228 w (the) 1789 6228 w (first) 1943 6228 w (color) 2136 6228 w (in) 2374 6228 w (the) 2485 6228 w (palette) 2640 6228 w (image) 2939 6228 w (is) 3216 6228 w (the) 3316 6228 w (default.) 3471 6228 w (Use) 3831 6228 w (the) 4019 6228 w 10 /Times-Bold f (\255firstisdefault) 4174 6228 w 10 /Times-Roman f (option) 4784 6228 w (for this.) 720 6348 w (The) 720 6504 w (palette) 911 6504 w (is) 1214 6504 w (simply) 1318 6504 w (a) 1628 6504 w (PNM) 1709 6504 w (image.) 1963 6504 w (The) 2294 6504 w (colors) 2486 6504 w (of) 2767 6504 w (the) 2887 6504 w (pixels) 3046 6504 w (in) 3322 6504 w (the) 3437 6504 w (image) 3596 6504 w (are) 3877 6504 w (the) 4035 6504 w (colors) 4194 6504 w (in) 4475 6504 w (the) 4590 6504 w (palette.) 4749 6504 w (Where) 720 6624 w (the) 1017 6624 w (pixels) 1171 6624 w (appear) 1442 6624 w (in) 1739 6624 w (the) 1849 6624 w (image,) 2003 6624 w (and) 2304 6624 w (the) 2480 6624 w (dimensions) 2634 6624 w (of) 3122 6624 w (the) 3237 6624 w (image,) 3391 6624 w (are) 3692 6624 w (irrelevant.) 3845 6624 w (Multiple) 4309 6624 w (pixels) 4686 6624 w (of) 4957 6624 w (the same color are fine.) 720 6744 w (However, a palette image is typically a single row with one pixel per color.) 1703 6744 w (If) 720 6900 w (you) 819 6900 w (specify) 1002 6900 w 10 /Times-Bold f (\255missing) 1323 6900 w 10 /Times-Roman f (,) 1679 6900 w (the) 1737 6900 w (color) 1892 6900 w (you) 2130 6900 w (so) 2313 6900 w (specify) 2435 6900 w (is) 2756 6900 w (in) 2856 6900 w (the) 2967 6900 w (palette) 3122 6900 w (in) 3421 6900 w (addition) 3532 6900 w (to) 3894 6900 w (whatever) 4006 6900 w (is) 4405 6900 w (in) 4506 6900 w (the) 4618 6900 w (palette) 4774 6900 w (image.) 720 7020 w (For) 720 7176 w (historical) 896 7176 w (reasons,) 1305 7176 w (Netpbm) 1666 7176 w (sometimes) 2025 7176 w (calls) 2490 7176 w (the) 2711 7176 w (palette) 2871 7176 w (a) 3175 7176 w ("colormap.") 3257 7176 w (But) 3779 7176 w (it) 3962 7176 w (doesn't) 4056 7176 w (really) 4388 7176 w (map) 4653 7176 w (any\255) 4863 7176 w (thing.) 720 7296 w 10 /Times-Bold f (pnmremap) 1005 7296 w 10 /Times-Roman f (creates) 1506 7296 w (its) 1811 7296 w (own) 1935 7296 w (map,) 2136 7296 w (based) 2362 7296 w (on) 2618 7296 w (the) 2747 7296 w (palette,) 2898 7296 w (to) 3218 7296 w (map) 3325 7296 w (colors) 3526 7296 w (from) 3799 7296 w (the) 4022 7296 w (input) 4172 7296 w (image) 4406 7296 w (to) 4678 7296 w (output) 4784 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 (colors.) 720 840 w 10 /Times-Bold f (Palette/Image Type Mismatch) 720 1080 w 10 /Times-Roman f (In) 720 1272 w (the) 831 1272 w (simple) 981 1272 w (case,) 1277 1272 w (the) 1502 1272 w (palette) 1653 1272 w (image) 1948 1272 w (is) 2221 1272 w (of) 2317 1272 w (the) 2429 1272 w (same) 2580 1272 w (depth) 2814 1272 w (\(number) 3065 1272 w (of) 3432 1272 w (planes,) 3544 1272 w (i.e.) 3853 1272 w (number) 4004 1272 w (of) 4338 1272 w (components) 4450 1272 w (in) 4962 1272 w (each) 720 1392 w (tuple) 934 1392 w (\(pixel\)\)) 1166 1392 w (as) 1497 1392 w (the) 1612 1392 w (input) 1766 1392 w (image) 2004 1392 w (and) 2280 1392 w 10 /Times-Bold f (pnmremap) 2456 1392 w 10 /Times-Roman f (just) 2960 1392 w (does) 3137 1392 w (a) 3352 1392 w (straightforward) 3428 1392 w (search) 4075 1392 w (of) 4360 1392 w (the) 4474 1392 w (palette) 4627 1392 w (for) 4924 1392 w (each input tuple \(pixel\).) 720 1512 w (In fact,) 1724 1512 w 10 /Times-Bold f (pnmremap) 2031 1512 w 10 /Times-Roman f (doesn't even care if the image is a visual image.) 2528 1512 w (But) 720 1668 w (what) 905 1668 w (about) 1139 1668 w (when) 1401 1668 w (the) 1657 1668 w (depths) 1819 1668 w (differ?) 2120 1668 w (In) 2450 1668 w (that) 2573 1668 w (case,) 2763 1668 w 10 /Times-Bold f (pnmremap) 2999 1668 w 10 /Times-Roman f (converts) 3511 1668 w (the) 3889 1668 w (input) 4051 1668 w (image) 4297 1668 w (\(in) 4581 1668 w (its) 4732 1668 w (own) 4868 1668 w (memory\) to match the palette and then proceeds as above.) 720 1788 w (There) 720 1944 w (are) 979 1944 w (only) 1127 1944 w (two) 1332 1944 w (such) 1509 1944 w (cases) 1719 1944 w (in) 1956 1944 w (which) 2061 1944 w 10 /Times-Bold f (pnmremap) 2332 1944 w 10 /Times-Roman f (knows) 2831 1944 w (how) 3119 1944 w (to) 3318 1944 w (do) 3423 1944 w (the) 3550 1944 w (conversion:) 3699 1944 w (when) 4218 1944 w (one) 4462 1944 w (of) 4634 1944 w (them) 4745 1944 w (is) 4973 1944 w (tuple) 720 2064 w (type) 951 2064 w (RGB,) 1154 2064 w (depth) 1415 2064 w (3,) 1667 2064 w (and) 1772 2064 w (the) 1946 2064 w (other) 2098 2064 w (is) 2333 2064 w (tuple) 2430 2064 w (type) 2660 2064 w (GRAYSCALE) 2862 2064 w (or) 3492 2064 w (BLACKANDWHITE,) 3605 2064 w (depth) 4536 2064 w (1;) 4788 2064 w (and) 4896 2064 w (vice versa.) 720 2184 w (In any other case,) 720 2340 w 10 /Times-Bold f (pnmremap) 1448 2340 w 10 /Times-Roman f (issues and error message and fails.) 1945 2340 w (Note) 720 2496 w (that) 942 2496 w (as) 1120 2496 w (long) 1231 2496 w (as) 1437 2496 w (your) 1548 2496 w (input) 1759 2496 w (and) 1993 2496 w (palette) 2166 2496 w (images) 2461 2496 w (are) 2773 2496 w (PNM,) 2923 2496 w (they'll) 3194 2496 w (always) 3484 2496 w (fall) 3790 2496 w (into) 3952 2496 w (one) 4137 2496 w (of) 4310 2496 w (the) 4422 2496 w (cases) 4573 2496 w 10 /Times-Bold f (pnm\255) 4812 2496 w (remap) 720 2616 w 10 /Times-Roman f (can handle.) 1022 2616 w (There's an issue only if you're using some exotic PAM image.) 1526 2616 w (Before) 720 2772 w (Netpbm) 1028 2772 w (10.27) 1387 2772 w (\(March) 1649 2772 w (2005\),) 1979 2772 w 10 /Times-Bold f (pnmremap) 2274 2772 w 10 /Times-Roman f (could) 2783 2772 w (not) 3042 2772 w (handle) 3207 2772 w (the) 3510 2772 w (case) 3669 2772 w (of) 3877 2772 w (a) 3997 2772 w (palette) 4079 2772 w (of) 4383 2772 w (greater) 4504 2772 w (depth) 4818 2772 w (than the input image.) 720 2892 w (\(It would issue an error message and fail in that case\).) 1614 2892 w (In any case, the output image has the same tuple type and depth as the palette image.) 720 3048 w 10 /Times-Bold f (Multiple Image Stream) 720 3288 w (pnmremap) 720 3480 w 10 /Times-Roman f (handles) 1225 3480 w (a) 1563 3480 w (multiple) 1640 3480 w (image) 2007 3480 w (input) 2284 3480 w (stream,) 2523 3480 w (producing) 2847 3480 w (a) 3285 3480 w (multiple) 3362 3480 w (image) 3729 3480 w (output) 4006 3480 w (stream.) 4295 3480 w (The) 4645 3480 w (input) 4834 3480 w (images need not be similar in any way.) 720 3600 w (Before Netpbm 10.30 \(October 2005\),) 720 3756 w 10 /Times-Bold f (pnmremap) 2275 3756 w 10 /Times-Roman f (ignored any image after the first.) 2772 3756 w 10 /Times-Bold f (Examples) 720 3996 w 10 /Times-Roman f (pnmcolormap testimg.ppm 256 >palette.ppm) 720 4212 w (pnmremap \255map=palette.ppm testimg.ppm >reduced) 720 4332 w 10 /S f (_) 2821 4332 w 10 /Times-Roman f (testimg.ppm) 2871 4332 w (To) 720 4548 w (limit) 857 4548 w (colors) 1073 4548 w (to) 1343 4548 w (a) 1447 4548 w (certain) 1517 4548 w (set,) 1814 4548 w (a) 1976 4548 w (typical) 2046 4548 w (example) 2344 4548 w (is) 2708 4548 w (to) 2801 4548 w (create) 2905 4548 w (an) 3169 4548 w (image) 3290 4548 w (for) 3561 4548 w (posting) 3704 4548 w (on) 4026 4548 w (the) 4153 4548 w (World) 4302 4548 w (Wide) 4584 4548 w (Web,) 4827 4548 w (where) 720 4668 w (different) 991 4668 w (browsers) 1362 4668 w (know) 1750 4668 w (different) 2000 4668 w (colors.) 2371 4668 w (But) 2692 4668 w (all) 2864 4668 w (browsers) 2991 4668 w (are) 3378 4668 w (supposed) 3526 4668 w (to) 3925 4668 w (know) 4030 4668 w (the) 4279 4668 w (216) 4428 4668 w ("web) 4605 4668 w (safe") 4839 4668 w (colors) 720 4788 w (which) 996 4788 w (are) 1272 4788 w (essentially) 1425 4788 w (all) 1879 4788 w (the) 2011 4788 w (colors) 2165 4788 w (you) 2441 4788 w (can) 2623 4788 w (represent) 2793 4788 w (in) 3190 4788 w (a) 3300 4788 w (PPM) 3376 4788 w (image) 3610 4788 w (with) 3887 4788 w (a) 4098 4788 w (maxval) 4175 4788 w (of) 4502 4788 w (5.) 4618 4788 w (So) 4751 4788 w (you) 4890 4788 w (can do this:) 720 4908 w (pamseq 3 5 >websafe.pam) 720 5088 w (pnmremap \255map=websafe.pam testimg.ppm >websafe) 720 5208 w 10 /S f (_) 2886 5208 w 10 /Times-Roman f (testimg.ppm) 2936 5208 w (Another useful palette is one for the 8 color IBM TTL color set, which you can create with) 720 5424 w (pamseq 3 1 >ibmttl.pam) 720 5604 w (If) 720 5820 w (you) 817 5820 w (want) 998 5820 w (to) 1223 5820 w (quantize) 1332 5820 w (one) 1701 5820 w (image) 1876 5820 w (to) 2152 5820 w (use) 2262 5820 w (the) 2427 5820 w (colors) 2581 5820 w (in) 2857 5820 w (another) 2967 5820 w (one,) 3298 5820 w (just) 3499 5820 w (use) 3676 5820 w (the) 3841 5820 w (second) 3995 5820 w (one) 4304 5820 w (as) 4480 5820 w (the) 4595 5820 w (palette.) 4749 5820 w (You don't have to reduce it down to only one pixel of each color, just use it as is.) 720 5940 w (The output image has the same type and maxval as the palette image.) 720 6096 w 10 /Times-Bold f (PARAMETERS) 720 6336 w 10 /Times-Roman f (There is one parameter, which is required: The file specification of the input PNM file.) 720 6528 w 10 /Times-Bold f (OPTIONS) 720 6768 w (\255mapfile=) 970 6960 w 10 /Times-Italic f (palettefilename) 1382 6960 w 10 /Times-Roman f (This names the file that contains the palette image.) 1998 6960 w (This option is mandatory.) 970 7116 w 10 /Times-Bold f (\255floyd) 970 7272 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 (\255fs) 970 840 w (\255nofloyd) 970 996 w (\255nofs) 970 1152 w 10 /Times-Roman f (These) 1220 1152 w (options) 1484 1152 w (determine) 1806 1152 w (whether) 2232 1152 w (Floyd\255Steinberg) 2580 1152 w (dithering) 3257 1152 w (is) 3645 1152 w (done.) 3739 1152 w (Without) 4010 1152 w (Floyd\255Steinberg,) 4365 1152 w (the) 1220 1272 w (selection) 1377 1272 w (of) 1767 1272 w (output) 1885 1272 w (color) 2176 1272 w (of) 2416 1272 w (a) 2534 1272 w (pixel) 2613 1272 w (is) 2848 1272 w (based) 2950 1272 w (on) 3212 1272 w (the) 3347 1272 w (color) 3504 1272 w (of) 3744 1272 w (only) 3861 1272 w (the) 4073 1272 w (corresponding) 4229 1272 w (input) 4834 1272 w (pixel.) 1220 1392 w (With) 1501 1392 w (Floyd\255Steinberg,) 1732 1392 w (multiple) 2438 1392 w (input) 2803 1392 w (pixels) 3040 1392 w (are) 3310 1392 w (considered) 3462 1392 w (so) 3925 1392 w (that) 4045 1392 w (the) 4226 1392 w (average) 4379 1392 w (color) 4720 1392 w (of) 4957 1392 w (an) 1220 1512 w (area) 1341 1512 w (tends) 1533 1512 w (to) 1771 1512 w (stay) 1876 1512 w (more) 2064 1512 w (the) 2296 1512 w (same) 2444 1512 w (than) 2675 1512 w (without) 2873 1512 w (Floyd\255Steinberg.) 3205 1512 w (For) 3931 1512 w (example,) 4096 1512 w (if) 4485 1512 w (you) 4572 1512 w (map) 4748 1512 w (an) 4946 1512 w (image) 1220 1632 w (with) 1496 1632 w (a) 1706 1632 w (black,) 1782 1632 w (gray,) 2055 1632 w (gray,) 2289 1632 w (and) 2523 1632 w (white) 2699 1632 w (pixel) 2954 1632 w (adjacent,) 3187 1632 w (to) 3577 1632 w (a) 3688 1632 w (palette) 3765 1632 w (that) 4064 1632 w (contains) 4247 1632 w (only) 4613 1632 w (black) 4824 1632 w (and) 1220 1752 w (white,) 1399 1752 w (it) 1681 1752 w (might) 1772 1752 w (result) 2041 1752 w (in) 2298 1752 w (an) 2411 1752 w (output) 2540 1752 w (of) 2830 1752 w (black,) 2947 1752 w (black,) 3222 1752 w (white,) 3497 1752 w (white.) 3778 1752 w (Pixel\255by\255pixel) 4084 1752 w (mapping) 4690 1752 w (would instead map both the gray pixels to the same color.) 1220 1872 w (Floyd\255Steinberg) 970 2028 w (gives) 1650 2028 w (vastly) 1891 2028 w (better) 2160 2028 w (results) 2417 2028 w (on) 2708 2028 w (images) 2838 2028 w (where) 3151 2028 w (unmodified) 3424 2028 w (quantization) 3915 2028 w (has) 4440 2028 w (banding) 4604 2028 w (or) 4957 2028 w (other) 970 2148 w (artifacts,) 1205 2148 w (especially) 1581 2148 w (when) 2010 2148 w (going) 2256 2148 w (to) 2514 2148 w (a) 2622 2148 w (small) 2696 2148 w (number) 2943 2148 w (of) 3278 2148 w (colors) 3390 2148 w (such) 3663 2148 w (as) 3875 2148 w (the) 3987 2148 w (above) 4138 2148 w (IBM) 4405 2148 w (set.) 4623 2148 w (How\255) 4813 2148 w (ever, it does take substantially more CPU time.) 970 2268 w 10 /Times-Bold f (\255fs) 970 2424 w 10 /Times-Roman f (is a synomym for) 1100 2424 w 10 /Times-Bold f (\255floyd) 1822 2424 w 10 /Times-Roman f (.) 2072 2424 w 10 /Times-Bold f (\255nofs) 2147 2424 w 10 /Times-Roman f (is a synonym for) 2383 2424 w 10 /Times-Bold f (\255nofloyd) 3077 2424 w 10 /Times-Roman f (.) 3433 2424 w (The default is) 970 2580 w 10 /Times-Bold f (\255nofloyd) 1544 2580 w 10 /Times-Roman f (.) 1900 2580 w 10 /Times-Bold f (\255firstisdefault) 970 2736 w 10 /Times-Roman f (This) 1547 2736 w (tells) 1754 2736 w 10 /Times-Bold f (pnmremap) 1950 2736 w 10 /Times-Roman f (to) 2451 2736 w (map) 2558 2736 w (any) 2759 2736 w (input) 2932 2736 w (color) 3167 2736 w (that) 3401 2736 w (is) 3580 2736 w (not) 3676 2736 w (in) 3833 2736 w (the) 3940 2736 w (palette) 4091 2736 w (to) 4386 2736 w (the) 4493 2736 w (first) 4644 2736 w (color) 4835 2736 w (in the palette \(the color of the pixel in the top left corner of the palette image\)) 1220 2856 w (See DESCRIPTION.) 970 3012 w (If you specify) 970 3168 w 10 /Times-Bold f (\255firstisdefault) 1549 3168 w 10 /Times-Roman f (, the maxval of your input must match the maxval of your palette image.) 2126 3168 w 10 /Times-Bold f (\255missingcolor=) 970 3324 w 10 /Times-Italic f (color) 1599 3324 w 10 /Times-Roman f (This) 1810 3324 w (specifies) 2025 3324 w (the) 2411 3324 w (default) 2570 3324 w (color) 2884 3324 w (for) 3127 3324 w 10 /Times-Bold f (pnmremap) 3281 3324 w 10 /Times-Roman f (to) 3791 3324 w (map) 3907 3324 w (to) 4117 3324 w (a) 4233 3324 w (color) 4315 3324 w (in) 4558 3324 w (the) 4674 3324 w (input) 4834 3324 w (image) 1220 3444 w (that) 1497 3444 w (isn't) 1680 3444 w (in) 1891 3444 w (the) 2002 3444 w (palette.) 2157 3444 w 10 /Times-Italic f (color) 2506 3444 w 10 /Times-Roman f (may) 2750 3444 w (or) 2955 3444 w (may) 3071 3444 w (not) 3276 3444 w (be) 3437 3444 w (in) 3563 3444 w (the) 3673 3444 w (palette) 3827 3444 w (image;) 4125 3444 w (it) 4429 3444 w (is) 4517 3444 w (part) 4616 3444 w (of) 4803 3444 w (the) 4918 3444 w (palette regardless.) 1220 3564 w (If you specify) 970 3720 w 10 /Times-Bold f (\255missingcolor) 1549 3720 w 10 /Times-Roman f (, the maxval of your input must match the maxval of your palette image.) 2121 3720 w 10 /Times-Bold f (\255verbose) 970 3876 w 10 /Times-Roman f (Display helpful messages about the mapping process.) 1330 3876 w 10 /Times-Bold f (SEE ALSO) 720 4116 w (pnmcolormap) 720 4272 w 10 /Times-Roman f (,) 1320 4272 w 10 /Times-Bold f (pamseq) 1370 4272 w 10 /Times-Roman f (,) 1698 4272 w 10 /Times-Bold f (pnmquant) 1748 4272 w 10 /Times-Roman f (,) 2194 4272 w 10 /Times-Bold f (ppmquantall) 2244 4272 w 10 /Times-Roman f (,) 2796 4272 w 10 /Times-Bold f (pamdepth) 2846 4272 w 10 /Times-Roman f (,) 3280 4272 w 10 /Times-Bold f (ppmdither) 3330 4272 w 10 /Times-Roman f (,) 3786 4272 w 10 /Times-Bold f (ppmquant) 3836 4272 w 10 /Times-Roman f (,) 4282 4272 w 10 /Times-Bold f (ppm) 4332 4272 w (AUTHOR) 720 4512 w 10 /Times-Roman f (Copyright \(C\) 1989, 1991 by Jef Poskanzer.) 720 4668 w 10 /S1 f (________________________________________________________________________) 720 4788 w 10 /Times-Bold f (Table Of Contents) 720 5028 w 10 /LucidaSansUnicode22 f (\031) 720 5220 w 10 /Times-Roman f (SYNOPSIS) 970 5220 w 10 /LucidaSansUnicode22 f (\031) 720 5376 w 10 /Times-Roman f (DESCRIPTION) 970 5376 w 10 /LucidaSansUnicode22 f (\031) 720 5532 w 10 /Times-Roman f (Palette/Image Type Mismatch) 970 5532 w 10 /LucidaSansUnicode22 f (\031) 720 5688 w 10 /Times-Roman f (Multiple Image Stream) 970 5688 w 10 /LucidaSansUnicode22 f (\031) 720 5844 w 10 /Times-Roman f (Examples) 970 5844 w 10 /LucidaSansUnicode22 f (\031) 720 6036 w 10 /Times-Roman f (PARAMETERS) 970 6036 w 10 /LucidaSansUnicode22 f (\031) 720 6192 w 10 /Times-Roman f (OPTIONS) 970 6192 w 10 /LucidaSansUnicode22 f (\031) 720 6348 w 10 /Times-Roman f (SEE ALSO) 970 6348 w 10 /LucidaSansUnicode22 f (\031) 720 6504 w 10 /Times-Roman f (AUTHOR) 970 6504 w cleartomark showpage saveobj restore %%EndPage: 3 3 %%Trailer done %%DocumentFonts: Times-Roman LucidaSansUnicode22 Times-Italic Times-Bold S1 S %%Pages: 3