%!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 (MRF image) 1559 1230 w (format) 2198 1230 w (specification Table) 2581 1230 w (Of) 3577 1230 w (Contents) 3741 1230 w 10 /Times-Bold f (MRF format) 720 1920 w 10 /Times-Roman f (Updated: 1991) 720 2076 w 10 /Times-Bold f (NAME) 720 2316 w 10 /Times-Roman f (MRF \255 monochrome recursive format \(compressed bitmaps\)) 720 2472 w 10 /Times-Bold f (DESCRIPTION) 720 2712 w 10 /Times-Roman f (This program is part of Netpbm.) 720 2904 w (MRF is a compressed format for bilevel) 720 3060 w (\(1\255bit) 2344 3060 w (mono\)) 2592 3060 w (images.) 2879 3060 w (It) 3238 3060 w (achieves) 3325 3060 w (better) 3694 3060 w (compression) 3947 3060 w (for) 4478 3060 w (some) 4620 3060 w (such) 4857 3060 w (images) 720 3180 w (than) 1038 3180 w (either) 1245 3180 w (GIF) 1507 3180 w (or) 1702 3180 w (PNG.) 1819 3180 w (\(It's) 2078 3180 w (also) 2278 3180 w (very) 2473 3180 w (easy) 2684 3180 w (to) 2895 3180 w (implement) 3007 3180 w (\(about) 3469 3180 w (the) 3758 3180 w (same) 3914 3180 w (difficulty) 4153 3180 w (as) 4559 3180 w (RLE,) 4676 3180 w (I'd) 4924 3180 w (say\) and an MRF reader needs no tables/buffers, which may make it useful for tiny machines\).) 720 3300 w (In) 720 3456 w (case) 834 3456 w (the) 1036 3456 w (above) 1189 3456 w (hasn't) 1458 3456 w (made) 1733 3456 w (it) 1980 3456 w (sufficiently) 2067 3456 w (clear,) 2553 3456 w (I'll) 2802 3456 w (make) 2956 3456 w (this) 3204 3456 w (next) 3381 3456 w (point) 3585 3456 w (explicitly:) 3823 3456 w (MRF) 4261 3456 w (cannot) 4505 3456 w (repre\255) 4803 3456 w (sent) 720 3576 w (color) 907 3576 w (at) 1138 3576 w (all.) 1236 3576 w (Nor) 1387 3576 w (can) 1568 3576 w (it) 1732 3576 w (represent) 1814 3576 w (grayscale.) 2205 3576 w (It's) 2657 3576 w (a) 2816 3576 w (specifically) 2886 3576 w (mono) 3372 3576 w (format.) 3626 3576 w (\(If) 3968 3576 w (you) 4093 3576 w (want) 4269 3576 w (to) 4489 3576 w (compress) 4593 3576 w (a) 4996 3576 w (color or grayscale image, my advice is to use JPEG2000\).) 720 3696 w (First, here's what goes where in an MRF file. I'll explain how the compression works afterward.) 720 3852 w (OffsetDescription) 970 4008 w (0) 970 4164 w (magic number \255 "MRF1" \(in ASCII\)) 1220 4164 w (4) 970 4320 w (width \(32\255bit, MSB first \(i.e. big\255endian\)\)) 1220 4320 w (8) 970 4476 w (height \(same\)) 1220 4476 w (12) 970 4632 w (reserved \(single byte, must be zero\)) 1220 4632 w (13) 970 4788 w (compressed data) 1220 4788 w (Note that there is no end\255of\255file marker in the file itself \255 the compressed data carries on right up to EOF.) 720 4944 w (The) 720 5100 w (way) 904 5100 w (the) 1099 5100 w (picture) 1250 5100 w (is) 1556 5100 w (compressed) 1653 5100 w (is) 2154 5100 w (essentially) 2251 5100 w (very) 2703 5100 w (simple,) 2910 5100 w (but) 3232 5100 w (as) 3390 5100 w (they) 3503 5100 w (say,) 3705 5100 w (the) 3893 5100 w (devil) 4045 5100 w (is) 4275 5100 w (in) 4372 5100 w (the) 4480 5100 w (detail.) 4632 5100 w (So) 4934 5100 w (don't be put off if it sounds confusing.) 720 5220 w (The) 720 5376 w (image) 911 5376 w (is) 1191 5376 w (treated) 1294 5376 w (as) 1601 5376 w (a) 1720 5376 w (number) 1800 5376 w (of) 2141 5376 w (64x64) 2260 5376 w (squares,) 2546 5376 w (forming) 2906 5376 w (a) 3264 5376 w (grid) 3344 5376 w (large) 3541 5376 w (enough) 3776 5376 w (to) 4106 5376 w (encompass) 4220 5376 w (it.) 4694 5376 w (\(If) 4811 5376 w (an) 4946 5376 w (image) 720 5496 w (is) 992 5496 w (\(say\)) 1087 5496 w (129x65,) 1314 5496 w (it'll) 1667 5496 w (be) 1840 5496 w (treated) 1962 5496 w (in) 2261 5496 w (the) 2367 5496 w (same) 2517 5496 w (way) 2750 5496 w (as) 2944 5496 w (a) 3055 5496 w (192x128) 3127 5496 w (one.) 3504 5496 w (On) 3700 5496 w (decompression,) 3849 5496 w (the) 4500 5496 w (extra) 4649 5496 w (area) 4875 5496 w (which was encoded \(the contents of this area is) 720 5616 w (undefined\)) 2625 5616 w (should) 3083 5616 w (be) 3376 5616 w (ignored.\)) 3496 5616 w (Each) 3885 5616 w (of) 4110 5616 w (these) 4219 5616 w (squares) 4450 5616 w (in) 4775 5616 w (turn) 4879 5616 w (\(in) 720 5736 w (left\255to\255right,) 860 5736 w (top\255to\255bottom) 1380 5736 w (order\)) 1965 5736 w (is) 2237 5736 w (recursively) 2333 5736 w (subdivided) 2805 5736 w (until) 3273 5736 w (the) 3485 5736 w (smallest) 3635 5736 w (completely) 3991 5736 w (black) 4463 5736 w (or) 4707 5736 w (white) 4818 5736 w (squares) 720 5856 w (are) 1065 5856 w (found.) 1232 5856 w (Some) 1536 5856 w (pseudocode) 1810 5856 w (\(eek!\)) 2327 5856 w (for) 2635 5856 w (the) 2798 5856 w (recursive) 2967 5856 w (subdivision) 3379 5856 w (routine) 3888 5856 w (should) 4218 5856 w (make) 4532 5856 w (things) 4795 5856 w (clearer:) 720 5976 w (if square size > 1x1 and square is all one color, output 1 bit) 820 6156 w (if whole square is black, output a 0 bit and return) 820 6276 w (if whole square is white, output a 1 bit and return) 820 6396 w (output a 0 bit) 820 6516 w (divide the square into four quarters, calling routine for) 820 6636 w (each in this order: top\255left, top\255right, bottom\255left, bottom\255right) 820 6756 w (\(Note) 720 6972 w (that) 975 6972 w (the) 1154 6972 w ("output) 1305 6972 w (a) 1631 6972 w (0) 1704 6972 w (bit") 1783 6972 w (stage) 1959 6972 w (is) 2193 6972 w (not) 2289 6972 w (reached) 2446 6972 w (for) 2784 6972 w (squares) 2929 6972 w (of) 3257 6972 w (size) 3369 6972 w (1x1,) 3553 6972 w (which) 3757 6972 w (is) 4030 6972 w (what) 4126 6972 w (stops) 4349 6972 w (it) 4584 6972 w (recursing) 4669 6972 w (infinitely.) 720 7092 w (I mention this as it may not be immediately obvious.\)) 1162 7092 w (The) 720 7248 w (whole) 905 7248 w (of) 1180 7248 w (the) 1294 7248 w (compressed) 1447 7248 w (data) 1949 7248 w (is) 2146 7248 w (made) 2244 7248 w (up) 2491 7248 w (of) 2622 7248 w (the) 2736 7248 w (bits) 2889 7248 w (output) 3065 7248 w (by) 3352 7248 w (the) 3483 7248 w (above) 3636 7248 w (routine.) 3905 7248 w (The) 4244 7248 w (bits) 4430 7248 w (are) 4606 7248 w (packed) 4758 7248 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 (into) 720 840 w (bytes) 902 840 w (MSB) 1139 840 w (first,) 1377 840 w (so) 1589 840 w (for) 1704 840 w (example) 1846 840 w (outputting) 2210 840 w (the) 2648 840 w (bits 1,0,0,0,0,0,0,0 would result in a 80h byte being out\255) 2796 840 w (put.) 720 960 w (Any) 901 960 w (`unused') 1101 960 w (bits) 1479 960 w (in) 1653 960 w (the) 1760 960 w (last) 1911 960 w (byte) 2079 960 w (output) 2280 960 w (are) 2565 960 w (undefined;) 2715 960 w (these) 3171 960 w (are) 3405 960 w (effectively) 3555 960 w (after) 4010 960 w (EOF) 4221 960 w (and) 4439 960 w (their) 4612 960 w (value) 4824 960 w (is unimportant.) 720 1080 w (If) 720 1236 w (writing) 818 1236 w (that) 1139 1236 w (sounds) 1321 1236 w (too) 1631 1236 w (much) 1791 1236 w (like) 2045 1236 w (hard) 2227 1236 w (work) 2436 1236 w (:\255\),) 2673 1236 w (you) 2824 1236 w (could) 3006 1236 w (always) 3260 1236 w (adapt) 3569 1236 w 10 /Times-Bold f (pbmtomrf) 3818 1236 w 10 /Times-Roman f (and/or) 4289 1236 w 10 /Times-Bold f (mrftopbm) 4577 1236 w 10 /Times-Roman f (.) 5015 1236 w (That's the main reason their source code is public domain, after all.) 720 1356 w (Above,) 720 1512 w (I) 1047 1512 w (said) 1116 1512 w (the) 1313 1512 w (contents) 1471 1512 w (of) 1840 1512 w (any) 1959 1512 w (extra) 2139 1512 w (area) 2374 1512 w (encoded) 2575 1512 w (\(when) 2943 1512 w (a) 3228 1512 w (bitmap) 3308 1512 w (smaller) 3622 1512 w (than) 3952 1512 w (the) 4160 1512 w (grid) 4319 1512 w (of) 4517 1512 w (squares) 4637 1512 w (is) 4973 1512 w (compressed\)) 720 1632 w (is) 1250 1632 w (undefined.) 1343 1632 w (This) 1818 1632 w (is) 2022 1632 w (deliberate) 2115 1632 w (so) 2534 1632 w (that) 2649 1632 w (the) 2825 1632 w (MRF) 2973 1632 w (compressor) 3211 1632 w (can) 3697 1632 w (make these unseen areas any\255) 3861 1632 w (thing it wants so as to maximize compression, rather than simply leaving it blank.) 720 1752 w 10 /Times-Bold f (pbmtomrf) 4013 1752 w 10 /Times-Roman f (does a little in) 4476 1752 w (this respect but could definitely be improved upon.) 720 1872 w 10 /Times-Bold f (mrftopbm) 720 2028 w 10 /Times-Roman f ('s) 1158 2028 w 10 /Times-Bold f (\2551) 1270 2028 w 10 /Times-Roman f (option) 1393 2028 w (causes) 1689 2028 w (it) 1989 2028 w (to) 2085 2028 w (include) 2203 2028 w (the) 2537 2028 w (edges,) 2699 2028 w (if) 2991 2028 w (any,) 3092 2028 w (in) 3301 2028 w (the) 3419 2028 w (output) 3581 2028 w (PBM.) 3877 2028 w (This) 4179 2028 w (may) 4398 2028 w (help) 4611 2028 w (when) 4824 2028 w (debugging a compressor's edge optimization.) 720 2148 w (Note) 720 2304 w (that) 942 2304 w (the) 1120 2304 w ("F") 1270 2304 w (in) 1436 2304 w (the) 1542 2304 w (name) 1692 2304 w ("MRF") 1936 2304 w (comes) 2258 2304 w (from) 2541 2304 w ("format,") 2764 2304 w (which) 3166 2304 w (is) 3439 2304 w (redundant) 3535 2304 w (because) 3963 2304 w (it) 4307 2304 w (is) 4392 2304 w (the) 4488 2304 w (name) 4639 2304 w (of) 4884 2304 w (a) 4996 2304 w (format.) 720 2424 w (That sort of makes "MRF format" sound as stupid as "PIN number," but it's not really that bad.) 1061 2424 w 10 /Times-Bold f (SEE ALSO) 720 2664 w (mrftopbm) 720 2820 w 10 /Times-Roman f (,) 1158 2820 w 10 /Times-Bold f (pbmtomrf) 1208 2820 w (AUTHOR) 720 3060 w 10 /Times-Roman f (Russell Marks.) 720 3216 w 10 /S1 f (________________________________________________________________________) 720 3336 w 10 /Times-Bold f (Index) 720 3576 w 10 /LucidaSansUnicode22 f (\031) 720 3768 w 10 /Times-Roman f (NAME) 970 3768 w 10 /LucidaSansUnicode22 f (\031) 720 3924 w 10 /Times-Roman f (DESCRIPTION) 970 3924 w 10 /LucidaSansUnicode22 f (\031) 720 4080 w 10 /Times-Roman f (SEE ALSO) 970 4080 w 10 /LucidaSansUnicode22 f (\031) 720 4236 w 10 /Times-Roman f (AUTHOR) 970 4236 w cleartomark showpage saveobj restore %%EndPage: 2 2 %%Trailer done %%DocumentFonts: Times-Roman LucidaSansUnicode22 Times-Bold S1 %%Pages: 2