home *** CD-ROM | disk | FTP | other *** search
/ Garbo / Garbo.cdr / mac / graphics / mactonxt.sit / pixiounit.p < prev    next >
MacBinary  |  1989-03-13  |  7.4 KB  |  [TEXT/MPS ]

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was processed as: MacBinary (archive/macBinary).

You can browse this item here: pixiounit.p

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert ZX81 Sinclair BASIC (image/sinclairBASIC) ext Supported
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Mon Mar 13 16:58:51 1989, modified Mon Mar 13 16:58:51 1989, creator 'MPS ', type ASCII, 6791 bytes "pixiounit.p" , at 0x1b07 408 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[MPS ]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0b 70 69 78 69 6f 75 | 6e 69 74 2e 70 00 00 00 |..pixiou|nit.p...|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 4d 50 53 | 20 01 00 00 00 00 00 00 |.TEXTMPS| .......|
|00000050| 00 00 00 00 00 1a 87 00 | 00 01 98 a0 41 ea 1b a0 |........|....A...|
|00000060| 41 ea 1b 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |A.......|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 6e da 00 00 |........|....n...|
|00000080| 75 6e 69 74 20 50 69 78 | 69 6f 75 6e 69 74 3b 0d |unit Pix|iounit;.|
|00000090| 0d 7b 0d 09 43 6f 70 79 | 72 69 67 68 74 20 a9 20 |.{..Copy|right . |
|000000a0| 31 39 38 39 20 41 6c 62 | 65 72 74 20 4c 75 6e 64 |1989 Alb|ert Lund|
|000000b0| 65 2c 20 4e 6f 72 74 68 | 77 65 73 74 65 72 6e 20 |e, North|western |
|000000c0| 55 6e 69 76 65 72 73 69 | 74 79 0d 09 41 6c 6c 20 |Universi|ty..All |
|000000d0| 52 69 67 68 74 73 20 52 | 65 73 65 72 76 65 64 0d |Rights R|eserved.|
|000000e0| 7d 0d 0d 69 6e 74 65 72 | 66 61 63 65 0d 0d 7b 61 |}..inter|face..{a|
|000000f0| 74 74 65 6d 70 74 20 74 | 6f 20 73 6d 61 73 68 20 |ttempt t|o smash |
|00000100| 6d 79 20 65 78 69 73 74 | 69 6e 67 20 63 6f 64 65 |my exist|ing code|
|00000110| 20 69 6e 74 6f 20 61 20 | 75 6e 69 74 20 74 6f 20 | into a |unit to |
|00000120| 6d 61 6b 65 20 69 74 20 | 6d 6f 64 75 6c 61 72 20 |make it |modular |
|00000130| 31 2f 32 32 2f 38 39 7d | 0d 7b 72 65 61 64 20 74 |1/22/89}|.{read t|
|00000140| 69 66 66 20 61 6e 64 20 | 6d 61 63 70 61 69 6e 74 |iff and |macpaint|
|00000150| 20 61 6e 64 20 65 78 70 | 65 72 69 6d 65 6e 74 20 | and exp|eriment |
|00000160| 77 69 74 68 20 72 61 6e | 64 6f 6d 20 61 6e 64 20 |with ran|dom and |
|00000170| 6f 72 64 65 72 65 64 20 | 64 69 74 68 65 72 7d 0d |ordered |dither}.|
|00000180| 0d 7b 76 65 72 73 69 6f | 6e 20 69 6e 20 70 72 6f |.{versio|n in pro|
|00000190| 67 72 65 73 73 20 6f 66 | 20 63 6f 64 65 20 74 6f |gress of| code to|
|000001a0| 20 77 72 69 74 65 20 61 | 20 74 69 66 66 20 66 69 | write a| tiff fi|
|000001b0| 6c 65 0d 20 63 6f 70 79 | 73 20 62 65 74 77 65 65 |le. copy|s betwee|
|000001c0| 6e 20 62 6f 74 68 20 66 | 6f 72 6d 61 74 73 20 77 |n both f|ormats w|
|000001d0| 69 74 68 20 73 6f 6d 65 | 20 62 75 67 73 20 31 2f |ith some| bugs 1/|
|000001e0| 31 36 2f 38 39 0d 20 73 | 74 72 69 70 6f 66 66 73 |16/89. s|tripoffs|
|000001f0| 65 74 73 20 76 61 6c 75 | 65 20 6f 72 20 74 68 65 |ets valu|e or the|
|00000200| 20 76 61 6c 75 65 20 6f | 66 20 74 68 65 20 72 61 | value o|f the ra|
|00000210| 74 69 6f 6e 61 6c 20 74 | 61 67 73 20 61 72 65 0d |tional t|ags are.|
|00000220| 20 6e 6f 74 20 62 65 69 | 6e 67 20 73 74 6f 72 65 | not bei|ng store|
|00000230| 64 20 63 6f 72 72 65 63 | 74 6c 79 3f 3f 20 20 20 |d correc|tly?? |
|00000240| 31 2f 31 37 2f 38 39 0d | 20 63 6f 6e 76 65 72 74 |1/17/89.| convert|
|00000250| 20 74 6f 20 4d 50 57 20 | 31 2f 31 39 2f 38 39 7d | to MPW |1/19/89}|
|00000260| 0d 0d 75 73 65 73 20 6d | 65 6d 74 79 70 65 73 2c |..uses m|emtypes,|
|00000270| 71 75 69 63 6b 64 72 61 | 77 2c 6f 73 69 6e 74 66 |quickdra|w,osintf|
|00000280| 2c 74 6f 6f 6c 69 6e 74 | 66 2c 0d 20 20 20 20 20 |,toolint|f,. |
|00000290| 66 69 78 6d 61 74 68 2c | 70 61 63 6b 69 6e 74 66 |fixmath,|packintf|
|000002a0| 2c 53 41 4e 45 2c 62 69 | 74 70 61 63 6b 75 6e 69 |,SANE,bi|tpackuni|
|000002b0| 74 2c 65 72 72 6f 72 75 | 6e 69 74 3b 0d 0d 63 6f |t,erroru|nit;..co|
|000002c0| 6e 73 74 0d 20 20 20 20 | 6d 61 78 69 66 64 63 6f |nst. |maxifdco|
|000002d0| 75 6e 74 3d 35 30 3b 0d | 09 49 6e 74 65 6c 42 79 |unt=50;.|.IntelBy|
|000002e0| 74 65 4f 72 64 65 72 3d | 24 34 39 34 39 3b 0d 09 |teOrder=|$4949;..|
|000002f0| 4d 6f 74 6f 72 6f 6c 61 | 42 79 74 65 4f 72 64 65 |Motorola|ByteOrde|
|00000300| 72 3d 24 34 44 34 44 3b | 0d 0d 0d 74 79 70 65 0d |r=$4D4D;|...type.|
|00000310| 20 20 20 20 20 20 20 20 | 62 75 66 66 65 72 72 65 | |bufferre|
|00000320| 63 6f 72 64 20 20 20 20 | 20 20 20 20 3d 20 20 72 |cord | = r|
|00000330| 65 63 6f 72 64 0d 09 09 | 20 20 20 20 20 20 20 20 |ecord...| |
|00000340| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 64 | | d|
|00000350| 61 74 61 3a 68 61 6e 64 | 6c 65 3b 0d 09 09 09 09 |ata:hand|le;.....|
|00000360| 09 09 09 20 20 20 77 6f | 72 64 73 69 7a 65 3a 6c |... wo|rdsize:l|
|00000370| 6f 6e 67 69 6e 74 3b 0d | 09 09 09 09 09 09 09 20 |ongint;.|....... |
|00000380| 20 20 62 79 74 65 73 69 | 7a 65 3a 6c 6f 6e 67 69 | bytesi|ze:longi|
|00000390| 6e 74 3b 0d 09 09 09 09 | 09 09 09 20 20 20 6c 6f |nt;.....|... lo|
|000003a0| 63 6b 63 6f 75 6e 74 3a | 69 6e 74 65 67 65 72 3b |ckcount:|integer;|
|000003b0| 0d 09 09 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |... | |
|000003c0| 20 20 20 20 20 20 20 20 | 20 20 65 6e 64 3b 0d 20 | | end;. |
|000003d0| 20 20 20 20 20 20 20 6f | 66 66 73 65 74 20 20 3d | o|ffset =|
|000003e0| 20 20 20 6c 6f 6e 67 69 | 6e 74 3b 0d 20 20 20 20 | longi|nt;. |
|000003f0| 20 20 20 20 0d 20 20 20 | 20 20 20 20 20 74 69 66 | . | tif|
|00000400| 66 68 65 61 64 65 72 72 | 65 63 6f 72 64 20 20 20 |fheaderr|ecord |
|00000410| 20 3d 20 20 20 72 65 63 | 6f 72 64 0d 20 20 20 20 | = rec|ord. |
|00000420| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000430| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000440| 62 79 74 65 6f 72 64 65 | 72 3a 69 6e 74 65 67 65 |byteorde|r:intege|
|00000450| 72 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r;. | |
|00000460| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000470| 20 20 20 20 20 20 20 76 | 65 72 73 69 6f 6e 6e 75 | v|ersionnu|
|00000480| 6d 62 65 72 3a 69 6e 74 | 65 67 65 72 3b 0d 20 20 |mber:int|eger;. |
|00000490| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004b0| 20 20 66 69 72 73 74 49 | 46 44 3a 6f 66 66 73 65 | firstI|FD:offse|
|000004c0| 74 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |t;. | |
|000004d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000004e0| 20 20 20 65 6e 64 3b 0d | 20 20 20 20 20 20 20 20 | end;.| |
|000004f0| 74 69 66 66 68 65 61 64 | 65 72 70 74 72 20 20 20 |tiffhead|erptr |
|00000500| 3d 20 20 20 5e 74 69 66 | 66 68 65 61 64 65 72 72 |= ^tif|fheaderr|
|00000510| 65 63 6f 72 64 3b 0d 20 | 20 20 20 20 20 20 20 74 |ecord;. | t|
|00000520| 69 66 66 49 46 44 66 69 | 65 6c 64 72 65 63 6f 72 |iffIFDfi|eldrecor|
|00000530| 64 20 20 3d 20 20 20 72 | 65 63 6f 72 64 0d 20 20 |d = r|ecord. |
|00000540| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000550| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000560| 20 20 74 61 67 3a 69 6e | 74 65 67 65 72 3b 0d 20 | tag:in|teger;. |
|00000570| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000580| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000590| 20 20 20 66 69 65 6c 64 | 74 79 70 65 3a 69 6e 74 | field|type:int|
|000005a0| 65 67 65 72 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |eger;. | |
|000005b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000005c0| 20 20 20 20 20 20 20 20 | 20 20 66 69 65 6c 64 63 | | fieldc|
|000005d0| 6f 75 6e 74 3a 6c 6f 6e | 67 69 6e 74 3b 0d 20 20 |ount:lon|gint;. |
|000005e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000005f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000600| 20 20 76 61 6c 75 65 61 | 74 3a 6f 66 66 73 65 74 | valuea|t:offset|
|00000610| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|00000620| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000630| 20 20 65 6e 64 3b 0d 20 | 20 20 20 20 20 20 20 74 | end;. | t|
|00000640| 69 66 66 72 61 74 69 6f | 6e 61 6c 20 20 20 20 3d |iffratio|nal =|
|00000650| 20 20 20 72 65 63 6f 72 | 64 0d 20 20 20 20 20 20 | recor|d. |
|00000660| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000670| 20 20 20 20 20 20 20 20 | 20 20 6e 75 6d 65 72 61 | | numera|
|00000680| 74 6f 72 3a 6c 6f 6e 67 | 69 6e 74 3b 0d 20 20 20 |tor:long|int;. |
|00000690| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000006a0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 64 65 6e | | den|
|000006b0| 6f 6d 69 6e 61 74 6f 72 | 3a 6c 6f 6e 67 69 6e 74 |ominator|:longint|
|000006c0| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|000006d0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 65 6e | | en|
|000006e0| 64 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |d;. | |
|000006f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000700| 20 20 20 0d 20 20 20 20 | 20 20 20 20 69 66 64 61 | . | ifda|
|00000710| 72 72 61 79 20 3d 20 61 | 72 72 61 79 5b 31 2e 2e |rray = a|rray[1..|
|00000720| 6d 61 78 69 66 64 63 6f | 75 6e 74 5d 20 6f 66 20 |maxifdco|unt] of |
|00000730| 74 69 66 66 49 46 44 66 | 69 65 6c 64 72 65 63 6f |tiffIFDf|ieldreco|
|00000740| 72 64 3b 0d 20 20 20 20 | 20 20 20 20 69 66 64 70 |rd;. | ifdp|
|00000750| 74 72 20 3d 20 5e 69 66 | 64 61 72 72 61 79 3b 0d |tr = ^if|darray;.|
|00000760| 20 20 20 20 20 20 20 20 | 69 66 64 68 61 6e 64 6c | |ifdhandl|
|00000770| 65 20 3d 20 5e 69 66 64 | 70 74 72 3b 0d 20 20 20 |e = ^ifd|ptr;. |
|00000780| 20 20 20 20 20 66 69 6c | 65 66 6f 72 6d 61 74 74 | fil|eformatt|
|00000790| 79 70 65 3d 28 6e 75 6c | 6c 5f 66 6f 72 6d 61 74 |ype=(nul|l_format|
|000007a0| 2c 74 69 66 66 5f 66 6f | 72 6d 61 74 2c 6d 61 63 |,tiff_fo|rmat,mac|
|000007b0| 70 61 69 6e 74 5f 66 6f | 72 6d 61 74 29 3b 0d 20 |paint_fo|rmat);. |
|000007c0| 20 20 20 20 20 20 20 66 | 69 6c 65 6d 6f 64 65 74 | f|ilemodet|
|000007d0| 79 70 65 3d 28 6e 75 6c | 6c 5f 6d 6f 64 65 2c 63 |ype=(nul|l_mode,c|
|000007e0| 6c 6f 73 65 64 5f 6d 6f | 64 65 2c 72 65 61 64 5f |losed_mo|de,read_|
|000007f0| 6d 6f 64 65 2c 77 72 69 | 74 65 5f 6d 6f 64 65 29 |mode,wri|te_mode)|
|00000800| 3b 0d 0d 20 20 20 20 20 | 20 20 70 69 78 66 69 6c |;.. | pixfil|
|00000810| 65 20 20 3d 20 20 20 72 | 65 63 6f 72 64 0d 20 20 |e = r|ecord. |
|00000820| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000830| 20 20 20 20 7b 67 65 6e | 65 72 69 63 20 69 6e 66 | {gen|eric inf|
|00000840| 6f 72 6d 61 74 69 6f 6e | 7d 0d 20 20 20 20 20 20 |ormation|}. |
|00000850| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000860| 20 20 20 20 20 20 7b 66 | 69 6c 65 20 69 6e 66 6f | {f|ile info|
|00000870| 72 6d 61 74 69 6f 6e 7d | 0d 20 20 20 20 20 20 20 |rmation}|. |
|00000880| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000890| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 6f 70 65 | | ope|
|000008a0| 6e 3a 62 6f 6f 6c 65 61 | 6e 3b 0d 20 20 20 20 20 |n:boolea|n;. |
|000008b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000008c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 69 | | i|
|000008d0| 6e 70 75 74 64 6f 6e 65 | 3a 62 6f 6f 6c 65 61 6e |nputdone|:boolean|
|000008e0| 3b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |;. | |
|000008f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000900| 20 20 20 20 20 20 66 69 | 6c 65 6d 6f 64 65 3a 66 | fi|lemode:f|
|00000910| 69 6c 65 6d 6f 64 65 74 | 79 70 65 3b 7b 72 65 61 |ilemodet|ype;{rea|
|00000920| 64 6d 6f 64 65 2f 77 72 | 69 74 65 6d 6f 64 65 7d |dmode/wr|itemode}|
|00000930| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000940| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000950| 20 20 20 20 20 66 69 6c | 65 6e 61 6d 65 3a 73 74 | fil|ename:st|
|00000960| 72 32 35 35 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |r255;. | |
|00000970| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000980| 20 20 20 20 20 20 20 20 | 20 20 77 64 72 65 66 6e | | wdrefn|
|00000990| 75 6d 3a 69 6e 74 65 67 | 65 72 3b 7b 66 6f 6c 64 |um:integ|er;{fold|
|000009a0| 65 72 7d 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |er}. | |
|000009b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009c0| 20 20 20 20 20 20 20 20 | 66 69 6c 65 72 65 66 6e | |filerefn|
|000009d0| 75 6d 3a 69 6e 74 65 67 | 65 72 3b 0d 20 20 20 20 |um:integ|er;. |
|000009e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000009f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a00| 66 69 6c 65 66 6f 72 6d | 61 74 3a 66 69 6c 65 66 |fileform|at:filef|
|00000a10| 6f 72 6d 61 74 74 79 70 | 65 3b 0d 20 20 20 20 20 |ormattyp|e;. |
|00000a20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a30| 20 20 20 20 20 20 20 20 | 7b 69 6d 61 67 65 20 66 | |{image f|
|00000a40| 69 65 6c 64 73 20 2d 20 | 73 6f 6d 65 20 62 61 73 |ields - |some bas|
|00000a50| 65 64 20 6f 6e 20 74 69 | 66 66 7d 0d 20 20 20 20 |ed on ti|ff}. |
|00000a60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000a80| 69 6d 61 67 65 77 69 64 | 74 68 3a 6c 6f 6e 67 69 |imagewid|th:longi|
|00000a90| 6e 74 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |nt;. | |
|00000aa0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ab0| 20 20 20 20 20 20 20 20 | 69 6d 61 67 65 6c 65 6e | |imagelen|
|00000ac0| 67 74 68 3a 6c 6f 6e 67 | 69 6e 74 3b 0d 20 20 20 |gth:long|int;. |
|00000ad0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ae0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000af0| 20 62 69 74 73 70 65 72 | 73 61 6d 70 6c 65 3a 6c | bitsper|sample:l|
|00000b00| 6f 6e 67 69 6e 74 3b 0d | 20 20 20 20 20 20 20 20 |ongint;.| |
|00000b10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b20| 20 20 20 20 20 20 20 20 | 20 20 20 20 6d 69 6e 73 | | mins|
|00000b30| 61 6d 70 6c 65 76 61 6c | 75 65 3a 69 6e 74 65 67 |ampleval|ue:integ|
|00000b40| 65 72 3b 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |er;. | |
|00000b50| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b60| 20 20 20 20 20 20 20 20 | 6d 61 78 73 61 6d 70 6c | |maxsampl|
|00000b70| 65 76 61 6c 75 65 3a 69 | 6e 74 65 67 65 72 3b 0d |evalue:i|nteger;.|
|00000b80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000b90| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ba0| 20 20 20 20 78 72 65 73 | 6f 6c 75 74 69 6f 6e 3a | xres|olution:|
|00000bb0| 74 69 66 66 72 61 74 69 | 6f 6e 61 6c 3b 0d 20 20 |tiffrati|onal;. |
|00000bc0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000bd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000be0| 20 20 79 72 65 73 6f 6c | 75 74 69 6f 6e 3a 74 69 | yresol|ution:ti|
|00000bf0| 66 66 72 61 74 69 6f 6e | 61 6c 3b 0d 09 09 09 09 |ffration|al;.....|
|00000c00| 09 09 09 20 20 7b 61 64 | 64 65 64 20 66 6f 72 20 |... {ad|ded for |
|00000c10| 6e 65 78 74 20 74 69 66 | 66 20 63 6f 6e 76 65 72 |next tif|f conver|
|00000c20| 73 69 6f 6e 20 32 2f 33 | 2f 38 39 7d 0d 09 09 09 |sion 2/3|/89}....|
|00000c30| 09 09 09 09 09 09 73 75 | 62 66 69 6c 65 74 79 70 |......su|bfiletyp|
|00000c40| 65 3a 69 6e 74 65 67 65 | 72 3b 0d 09 09 09 09 09 |e:intege|r;......|
|00000c50| 09 09 09 09 70 6c 61 6e | 61 72 63 6f 6e 66 69 67 |....plan|arconfig|
|00000c60| 75 72 61 74 69 6f 6e 3a | 69 6e 74 65 67 65 72 3b |uration:|integer;|
|00000c70| 0d 09 09 09 09 09 09 09 | 09 09 70 68 6f 74 6f 6d |........|..photom|
|00000c80| 65 74 72 69 63 69 6e 74 | 65 72 70 72 65 74 61 74 |etricint|erpretat|
|00000c90| 69 6f 6e 3a 69 6e 74 65 | 67 65 72 3b 0d 20 20 20 |ion:inte|ger;. |
|00000ca0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000cb0| 20 20 20 20 20 20 20 20 | 20 20 20 7b 64 65 72 69 | | {deri|
|00000cc0| 76 65 64 20 69 6e 66 6f | 72 6d 61 74 69 6f 6e 20 |ved info|rmation |
|00000cd0| 61 6e 64 20 77 6f 72 6b | 20 76 61 72 69 61 62 6c |and work| variabl|
|00000ce0| 65 73 7d 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |es}. | |
|00000cf0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d00| 20 20 20 20 20 20 20 20 | 62 79 74 65 73 70 65 72 | |bytesper|
|00000d10| 72 6f 77 3a 6c 6f 6e 67 | 69 6e 74 3b 7b 77 68 65 |row:long|int;{whe|
|00000d20| 6e 20 75 6e 63 6f 6d 70 | 72 65 73 73 65 64 7d 0d |n uncomp|ressed}.|
|00000d30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d50| 20 20 20 20 72 6f 77 73 | 69 7a 65 75 6e 69 74 3a | rows|izeunit:|
|00000d60| 69 6e 74 65 67 65 72 3b | 7b 62 69 74 73 7d 0d 20 |integer;|{bits}. |
|00000d70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000d90| 20 20 20 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 | . | |
|00000da0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000db0| 20 20 20 20 20 20 20 20 | 7b 63 6f 75 6e 74 20 66 | |{count f|
|00000dc0| 6f 72 20 73 65 71 75 65 | 6e 74 69 61 6c 20 73 63 |or seque|ntial sc|
|00000dd0| 61 6e 7d 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |an}. | |
|00000de0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000df0| 20 20 20 20 20 20 20 20 | 63 75 72 72 65 6e 74 72 | |currentr|
|00000e00| 6f 77 3a 6c 6f 6e 67 69 | 6e 74 3b 0d 20 20 20 20 |ow:longi|nt;. |
|00000e10| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e20| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e30| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|00000e40| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e50| 20 20 20 20 20 7b 70 6f | 73 69 74 69 6f 6e 20 77 | {po|sition w|
|00000e60| 6f 72 6b 20 76 61 72 69 | 61 62 6c 65 0d 20 20 20 |ork vari|able. |
|00000e70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e80| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000e90| 20 20 6d 61 79 20 6e 6f | 74 20 62 65 20 75 70 20 | may no|t be up |
|00000ea0| 74 6f 20 64 61 74 65 7d | 0d 20 20 20 20 20 20 20 |to date}|. |
|00000eb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ec0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 63 75 72 | | cur|
|00000ed0| 72 65 6e 74 5f 66 69 6c | 65 5f 70 6f 73 69 74 69 |rent_fil|e_positi|
|00000ee0| 6f 6e 3a 6c 6f 6e 67 69 | 6e 74 3b 0d 20 20 20 20 |on:longi|nt;. |
|00000ef0| 20 20 20 20 20 20 20 20 | 09 09 09 09 20 20 20 7b | |.... {|
|00000f00| 61 64 64 65 64 20 66 6f | 72 20 6e 65 78 74 20 74 |added fo|r next t|
|00000f10| 69 66 66 20 63 6f 6e 76 | 65 72 73 69 6f 6e 20 32 |iff conv|ersion 2|
|00000f20| 2f 33 2f 38 39 7d 0d 09 | 09 09 20 20 20 20 20 20 |/3/89}..|.. |
|00000f30| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f40| 20 20 77 68 69 74 65 73 | 61 6d 70 6c 65 76 61 6c | whites|ampleval|
|00000f50| 75 65 3a 69 6e 74 65 67 | 65 72 3b 0d 20 20 20 20 |ue:integ|er;. |
|00000f60| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f70| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000f80| 62 6c 61 63 6b 73 61 6d | 70 6c 65 76 61 6c 75 65 |blacksam|plevalue|
|00000f90| 3a 69 6e 74 65 67 65 72 | 3b 0d 09 09 09 09 09 09 |:integer|;.......|
|00000fa0| 09 09 09 0d 20 20 20 20 | 20 20 20 20 20 20 20 20 |.... | |
|00000fb0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fc0| 20 20 20 7b 62 75 66 66 | 65 72 7d 0d 20 20 20 20 | {buff|er}. |
|00000fd0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000fe0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00000ff0| 20 62 75 66 66 65 72 3a | 62 75 66 66 65 72 72 65 | buffer:|bufferre|
|00001000| 63 6f 72 64 3b 0d 09 09 | 09 09 09 09 09 09 09 20 |cord;...|....... |
|00001010| 67 72 61 79 62 75 66 66 | 65 72 3a 62 75 66 66 65 |graybuff|er:buffe|
|00001020| 72 72 65 63 6f 72 64 3b | 0d 20 20 20 20 20 20 20 |rrecord;|. |
|00001030| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 7b 54 69 | | {Ti|
|00001040| 66 66 20 53 70 65 63 69 | 66 69 63 7d 0d 20 20 20 |ff Speci|fic}. |
|00001050| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001060| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001070| 20 68 65 61 64 65 72 3a | 74 69 66 66 68 65 61 64 | header:|tiffhead|
|00001080| 65 72 72 65 63 6f 72 64 | 3b 0d 09 09 09 09 09 09 |errecord|;.......|
|00001090| 09 09 09 73 77 61 70 69 | 6e 70 75 74 62 79 74 65 |...swapi|nputbyte|
|000010a0| 73 3a 62 6f 6f 6c 65 61 | 6e 3b 0d 20 20 20 20 20 |s:boolea|n;. |
|000010b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 7b | | {|
|000010c0| 69 6d 61 67 65 20 66 69 | 6c 65 20 64 69 72 65 63 |image fi|le direc|
|000010d0| 74 6f 72 79 7d 0d 20 20 | 20 20 20 20 20 20 20 20 |tory}. | |
|000010e0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000010f0| 20 20 20 20 20 20 20 20 | 20 20 49 46 44 6e 75 6d | | IFDnum|
|00001100| 62 65 72 3a 69 6e 74 65 | 67 65 72 3b 0d 20 20 20 |ber:inte|ger;. |
|00001110| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001120| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001130| 20 49 46 44 63 6f 75 6e | 74 3a 69 6e 74 65 67 65 | IFDcoun|t:intege|
|00001140| 72 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |r;. | |
|00001150| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001160| 20 20 20 20 20 20 20 69 | 66 64 3a 69 66 64 68 61 | i|fd:ifdha|
|00001170| 6e 64 6c 65 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |ndle;. | |
|00001180| 20 20 20 20 20 20 20 20 | 20 20 7b 74 69 66 66 20 | | {tiff |
|00001190| 66 69 65 6c 64 73 20 77 | 65 20 75 73 65 20 6f 6e |fields w|e use on|
|000011a0| 20 69 6e 70 75 74 7d 0d | 20 20 20 20 20 20 20 20 | input}.| |
|000011b0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|000011c0| 20 20 20 20 20 20 20 20 | 20 20 20 20 73 74 72 69 | | stri|
|000011d0| 70 6f 66 66 73 65 74 73 | 3a 6f 66 66 73 65 74 3b |poffsets|:offset;|
|000011e0| 0d 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 |. | |
|000011f0| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001200| 20 20 20 20 20 63 6f 6d | 70 72 65 73 73 69 6f 6e | com|pression|
|00001210| 74 61 67 3a 69 6e 74 65 | 67 65 72 3b 0d 20 20 20 |tag:inte|ger;. |
|00001220| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 20 20 20 | | |
|00001230| 20 20 20 20 20 20 20 20 | 20 20 20 20 20 65 6e 64 | | end|
|00001240| 3b 0d 09 09 09 09 09 09 | 09 09 0d 76 61 72 20 69 |;.......|...var i|
|00001250| 6e 70 75 74 66 69 6c 65 | 2c 6f 75 74 70 75 74 66 |nputfile|,outputf|
|00001260| 69 6c 65 3a 70 69 78 66 | 69 6c 65 3b 0d 20 20 20 |ile:pixf|ile;. |
|00001270| 20 73 75 70 70 72 65 73 | 73 5f 6e 6f 6e 5f 6e 65 | suppres|s_non_ne|
|00001280| 78 74 5f 74 61 67 73 3a | 62 6f 6f 6c 65 61 6e 3b |xt_tags:|boolean;|
|00001290| 0d 0d 70 72 6f 63 65 64 | 75 72 65 20 70 69 78 69 |..proced|ure pixi|
|000012a0| 6f 5f 69 6e 69 74 69 61 | 6c 69 7a 65 3b 7b 63 61 |o_initia|lize;{ca|
|000012b0| 6c 6c 20 74 6f 20 64 65 | 66 69 6e 65 20 63 6f 6e |ll to de|fine con|
|000012c0| 73 74 61 6e 74 73 2f 6d | 65 6d 6f 72 79 7d 0d 0d |stants/m|emory}..|
|000012d0| 70 72 6f 63 65 64 75 72 | 65 20 6e 65 77 5f 70 69 |procedur|e new_pi|
|000012e0| 78 66 69 6c 65 28 76 61 | 72 20 70 66 69 6c 65 3a |xfile(va|r pfile:|
|000012f0| 70 69 78 66 69 6c 65 29 | 3b 0d 0d 7b 62 75 66 66 |pixfile)|;..{buff|
|00001300| 65 72 20 61 6c 6c 6f 63 | 61 74 69 6f 6e 20 72 6f |er alloc|ation ro|
|00001310| 75 74 69 6e 65 73 0d 20 | 74 68 65 73 65 20 61 73 |utines. |these as|
|00001320| 73 75 6d 65 20 61 20 73 | 69 6e 67 6c 65 20 6d 61 |sume a s|ingle ma|
|00001330| 73 74 65 72 20 76 61 72 | 69 61 62 6c 65 0d 20 6b |ster var|iable. k|
|00001340| 65 65 70 73 20 74 72 61 | 63 6b 20 6f 66 20 74 68 |eeps tra|ck of th|
|00001350| 65 20 62 75 66 66 65 72 | 20 62 75 74 20 74 68 61 |e buffer| but tha|
|00001360| 74 0d 20 73 65 76 65 72 | 61 6c 20 6c 65 76 65 6c |t. sever|al level|
|00001370| 73 20 6f 66 20 73 75 62 | 72 6f 75 74 69 6e 65 73 |s of sub|routines|
|00001380| 20 6d 61 79 20 62 65 0d | 20 6c 6f 63 6b 69 6e 67 | may be.| locking|
|00001390| 20 61 6e 64 20 75 6e 6c | 6f 63 6b 69 6e 67 20 69 | and unl|ocking i|
|000013a0| 74 0d 20 70 61 73 73 20 | 62 75 66 66 65 72 73 20 |t. pass |buffers |
|000013b0| 61 73 20 76 61 72 20 70 | 61 72 61 6d 65 74 65 72 |as var p|arameter|
|000013c0| 73 7d 0d 20 0d 70 72 6f | 63 65 64 75 72 65 20 6e |s}. .pro|cedure n|
|000013d0| 65 77 5f 62 75 66 66 65 | 72 28 76 61 72 20 62 75 |ew_buffe|r(var bu|
|000013e0| 66 66 65 72 3a 62 75 66 | 66 65 72 72 65 63 6f 72 |ffer:buf|ferrecor|
|000013f0| 64 29 3b 0d 20 20 20 20 | 20 20 20 20 20 7b 73 65 |d);. | {se|
|00001400| 74 75 70 20 61 6e 20 65 | 6d 70 74 79 20 62 75 66 |tup an e|mpty buf|
|00001410| 66 65 72 7d 0d 0d 70 72 | 6f 63 65 64 75 72 65 20 |fer}..pr|ocedure |
|00001420| 61 6c 6c 6f 63 61 74 65 | 5f 62 75 66 66 65 72 28 |allocate|_buffer(|
|00001430| 76 61 72 20 62 75 66 66 | 65 72 3a 62 75 66 66 65 |var buff|er:buffe|
|00001440| 72 72 65 63 6f 72 64 3b | 0d 09 09 09 09 09 09 09 |rrecord;|........|
|00001450| 6e 62 79 74 65 73 3a 6c | 6f 6e 67 69 6e 74 29 3b |nbytes:l|ongint);|
|00001460| 0d 0d 70 72 6f 63 65 64 | 75 72 65 20 6c 6f 63 6b |..proced|ure lock|
|00001470| 5f 62 75 66 66 65 72 28 | 76 61 72 20 62 75 66 66 |_buffer(|var buff|
|00001480| 65 72 3a 62 75 66 66 65 | 72 72 65 63 6f 72 64 29 |er:buffe|rrecord)|
|00001490| 3b 0d 0d 70 72 6f 63 65 | 64 75 72 65 20 75 6e 6c |;..proce|dure unl|
|000014a0| 6f 63 6b 5f 62 75 66 66 | 65 72 28 76 61 72 20 62 |ock_buff|er(var b|
|000014b0| 75 66 66 65 72 3a 62 75 | 66 66 65 72 72 65 63 6f |uffer:bu|fferreco|
|000014c0| 72 64 29 3b 0d 0d 70 72 | 6f 63 65 64 75 72 65 20 |rd);..pr|ocedure |
|000014d0| 72 65 6c 65 61 73 65 5f | 62 75 66 66 65 72 28 76 |release_|buffer(v|
|000014e0| 61 72 20 62 75 66 66 65 | 72 3a 62 75 66 66 65 72 |ar buffe|r:buffer|
|000014f0| 72 65 63 6f 72 64 29 3b | 0d 20 20 20 20 20 20 20 |record);|. |
|00001500| 20 20 20 7b 64 65 61 6c | 6c 6f 63 61 74 65 20 61 | {deal|locate a|
|00001510| 6e 64 20 75 6e 6c 6f 63 | 6b 7d 0d 0d 7b 7d 0d 28 |nd unloc|k}..{}.(|
|00001520| 2a 2a 29 0d 0d 70 72 6f | 63 65 64 75 72 65 20 63 |**)..pro|cedure c|
|00001530| 6c 6f 73 65 5f 70 69 78 | 66 69 6c 65 28 76 61 72 |lose_pix|file(var|
|00001540| 20 70 66 69 6c 65 3a 70 | 69 78 66 69 6c 65 29 3b | pfile:p|ixfile);|
|00001550| 0d 0d 70 72 6f 63 65 64 | 75 72 65 20 73 65 6c 65 |..proced|ure sele|
|00001560| 63 74 5f 69 6e 70 75 74 | 5f 70 69 78 66 69 6c 65 |ct_input|_pixfile|
|00001570| 28 09 76 61 72 20 70 66 | 69 6c 65 3a 70 69 78 66 |(.var pf|ile:pixf|
|00001580| 69 6c 65 3b 0d 09 09 09 | 09 76 61 72 20 63 61 6e |ile;....|.var can|
|00001590| 63 65 6c 3a 62 6f 6f 6c | 65 61 6e 29 3b 0d 70 72 |cel:bool|ean);.pr|
|000015a0| 6f 63 65 64 75 72 65 20 | 73 65 6c 65 63 74 5f 6f |ocedure |select_o|
|000015b0| 75 74 70 75 74 5f 5f 70 | 69 78 66 69 6c 65 28 0d |utput__p|ixfile(.|
|000015c0| 20 20 20 20 70 72 6f 77 | 73 3a 6c 6f 6e 67 69 6e | prow|s:longin|
|000015d0| 74 3b 0d 20 20 20 20 70 | 63 6f 6c 73 3a 6c 6f 6e |t;. p|cols:lon|
|000015e0| 67 69 6e 74 3b 0d 20 20 | 20 20 70 62 69 74 73 70 |gint;. | pbitsp|
|000015f0| 65 72 73 61 6d 70 6c 65 | 3a 69 6e 74 65 67 65 72 |ersample|:integer|
|00001600| 3b 0d 20 20 20 20 70 78 | 72 65 73 6f 6c 75 74 69 |;. px|resoluti|
|00001610| 6f 6e 3a 74 69 66 66 72 | 61 74 69 6f 6e 61 6c 3b |on:tiffr|ational;|
|00001620| 0d 20 20 20 20 70 79 72 | 65 73 6f 6c 75 74 69 6f |. pyr|esolutio|
|00001630| 6e 3a 74 69 66 66 72 61 | 74 69 6f 6e 61 6c 3b 0d |n:tiffra|tional;.|
|00001640| 09 70 70 68 6f 74 6f 6d | 65 74 72 69 63 3a 69 6e |.pphotom|etric:in|
|00001650| 74 65 67 65 72 3b 0d 20 | 20 20 20 6f 72 67 6e 61 |teger;. | orgna|
|00001660| 6d 65 3a 73 74 72 32 35 | 35 3b 0d 20 20 20 20 76 |me:str25|5;. v|
|00001670| 61 72 20 70 66 69 6c 65 | 3a 70 69 78 66 69 6c 65 |ar pfile|:pixfile|
|00001680| 3b 0d 09 76 61 72 20 63 | 61 6e 63 65 6c 3a 62 6f |;..var c|ancel:bo|
|00001690| 6f 6c 65 61 6e 29 3b 0d | 09 0d 70 72 6f 63 65 64 |olean);.|..proced|
|000016a0| 75 72 65 20 67 65 74 5f | 67 72 61 79 72 6f 77 5f |ure get_|grayrow_|
|000016b0| 70 69 78 66 69 6c 65 28 | 76 61 72 20 70 66 69 6c |pixfile(|var pfil|
|000016c0| 65 3a 70 69 78 66 69 6c | 65 3b 0d 20 20 20 20 20 |e:pixfil|e;. |
|000016d0| 20 20 20 20 20 20 20 20 | 20 20 20 6c 69 6e 65 70 | | linep|
|000016e0| 74 72 3a 70 74 72 3b 0d | 20 20 20 20 20 20 20 20 |tr:ptr;.| |
|000016f0| 20 20 20 20 20 20 20 20 | 6d 61 78 6c 69 6e 65 3a | |maxline:|
|00001700| 69 6e 74 65 67 65 72 3b | 7b 6d 61 78 20 62 79 74 |integer;|{max byt|
|00001710| 65 73 20 74 6f 20 67 65 | 74 7d 0d 20 20 20 20 20 |es to ge|t}. |
|00001720| 20 20 20 20 20 20 20 20 | 20 20 20 64 6f 6e 65 3a | | done:|
|00001730| 62 6f 6f 6c 65 61 6e 29 | 3b 0d 70 72 6f 63 65 64 |boolean)|;.proced|
|00001740| 75 72 65 20 70 75 74 5f | 67 72 61 79 72 6f 77 5f |ure put_|grayrow_|
|00001750| 70 69 78 66 69 6c 65 28 | 76 61 72 20 70 66 69 6c |pixfile(|var pfil|
|00001760| 65 3a 70 69 78 66 69 6c | 65 3b 0d 20 20 20 20 20 |e:pixfil|e;. |
|00001770| 20 20 20 20 20 20 20 20 | 20 20 20 6c 69 6e 65 70 | | linep|
|00001780| 74 72 3a 70 74 72 3b 0d | 20 20 20 20 20 20 20 20 |tr:ptr;.| |
|00001790| 20 20 20 20 20 20 20 20 | 6d 61 78 6c 69 6e 65 3a | |maxline:|
|000017a0| 69 6e 74 65 67 65 72 3b | 7b 6d 61 78 20 62 79 74 |integer;|{max byt|
|000017b0| 65 73 20 74 6f 20 67 65 | 74 7d 0d 20 20 20 20 20 |es to ge|t}. |
|000017c0| 20 20 20 20 20 20 20 20 | 20 20 20 64 6f 6e 65 3a | | done:|
|000017d0| 62 6f 6f 6c 65 61 6e 29 | 3b 0d 70 72 6f 63 65 64 |boolean)|;.proced|
|000017e0| 75 72 65 20 67 65 74 5f | 62 69 74 72 6f 77 5f 70 |ure get_|bitrow_p|
|000017f0| 69 78 66 69 6c 65 28 76 | 61 72 20 70 66 69 6c 65 |ixfile(v|ar pfile|
|00001800| 3a 70 69 78 66 69 6c 65 | 3b 0d 20 20 20 20 20 20 |:pixfile|;. |
|00001810| 20 20 20 20 20 20 20 20 | 20 20 6c 69 6e 65 70 74 | | linept|
|00001820| 72 3a 70 74 72 3b 0d 20 | 20 20 20 20 20 20 20 20 |r:ptr;. | |
|00001830| 20 20 20 20 20 20 20 6d | 61 78 6c 69 6e 65 3a 69 | m|axline:i|
|00001840| 6e 74 65 67 65 72 3b 7b | 6d 61 78 20 62 79 74 65 |nteger;{|max byte|
|00001850| 73 20 74 6f 20 67 65 74 | 7d 0d 20 20 20 20 20 20 |s to get|}. |
|00001860| 20 20 20 20 20 20 20 20 | 20 20 64 6f 6e 65 3a 62 | | done:b|
|00001870| 6f 6f 6c 65 61 6e 29 3b | 0d 70 72 6f 63 65 64 75 |oolean);|.procedu|
|00001880| 72 65 20 70 75 74 5f 62 | 69 74 72 6f 77 5f 70 69 |re put_b|itrow_pi|
|00001890| 78 66 69 6c 65 28 76 61 | 72 20 70 66 69 6c 65 3a |xfile(va|r pfile:|
|000018a0| 70 69 78 66 69 6c 65 3b | 0d 20 20 20 20 20 20 20 |pixfile;|. |
|000018b0| 20 20 20 20 20 20 20 20 | 20 6c 69 6e 65 70 74 72 | | lineptr|
|000018c0| 3a 70 74 72 3b 0d 20 20 | 20 20 20 20 20 20 20 20 |:ptr;. | |
|000018d0| 20 20 20 20 20 20 6d 61 | 78 6c 69 6e 65 3a 69 6e | ma|xline:in|
|000018e0| 74 65 67 65 72 3b 7b 6d | 61 78 20 62 79 74 65 73 |teger;{m|ax bytes|
|000018f0| 20 74 6f 20 67 65 74 7d | 0d 20 20 20 20 20 20 20 | to get}|. |
|00001900| 20 20 20 20 20 20 20 20 | 20 64 6f 6e 65 3a 62 6f | | done:bo|
|00001910| 6f 6c 65 61 6e 29 3b 0d | 09 09 09 09 0d 7b 72 6f |olean);.|.....{ro|
|00001920| 75 74 69 6e 65 73 20 74 | 68 61 74 20 75 73 65 20 |utines t|hat use |
|00001930| 69 6e 70 75 74 20 66 69 | 6c 65 20 6f 72 20 6f 75 |input fi|le or ou|
|00001940| 74 70 75 74 20 66 69 6c | 65 7d 0d 70 72 6f 63 65 |tput fil|e}.proce|
|00001950| 64 75 72 65 20 63 6c 6f | 73 65 5f 61 6c 6c 3b 0d |dure clo|se_all;.|
|00001960| 0d 70 72 6f 63 65 64 75 | 72 65 20 64 72 61 77 70 |.procedu|re drawp|
|00001970| 69 78 72 6f 77 73 28 6d | 79 77 69 6e 64 6f 77 3a |ixrows(m|ywindow:|
|00001980| 67 72 61 66 70 74 72 3b | 76 61 72 20 70 66 69 6c |grafptr;|var pfil|
|00001990| 65 3a 70 69 78 66 69 6c | 65 3b 6c 69 6d 69 74 3a |e:pixfil|e;limit:|
|000019a0| 69 6e 74 65 67 65 72 29 | 3b 0d 0d 70 72 6f 63 65 |integer)|;..proce|
|000019b0| 64 75 72 65 20 64 72 61 | 77 5f 6f 6e 65 5f 70 69 |dure dra|w_one_pi|
|000019c0| 78 72 6f 77 28 6d 79 77 | 69 6e 64 6f 77 3a 67 72 |xrow(myw|indow:gr|
|000019d0| 61 66 70 74 72 3b 76 61 | 72 20 70 66 69 6c 65 3a |afptr;va|r pfile:|
|000019e0| 70 69 78 66 69 6c 65 3b | 0d 09 09 09 09 09 09 73 |pixfile;|.......s|
|000019f0| 6f 75 72 63 65 3a 70 74 | 72 3b 0d 09 09 09 09 09 |ource:pt|r;......|
|00001a00| 09 69 72 6f 77 3a 6c 6f | 6e 67 69 6e 74 3b 0d 09 |.irow:lo|ngint;..|
|00001a10| 09 09 09 09 09 66 72 61 | 6d 65 69 74 3a 62 6f 6f |.....fra|meit:boo|
|00001a20| 6c 65 61 6e 3b 0d 09 09 | 09 09 09 09 76 61 72 20 |lean;...|....var |
|00001a30| 61 74 3a 70 6f 69 6e 74 | 29 3b 0d 0d 0d 7b 75 74 |at:point|);...{ut|
|00001a40| 69 6c 69 74 79 20 72 6f | 75 74 69 6e 65 73 7d 0d |ility ro|utines}.|
|00001a50| 66 75 6e 63 74 69 6f 6e | 20 72 61 6e 64 62 69 74 |function| randbit|
|00001a60| 3a 69 6e 74 65 67 65 72 | 3b 0d 70 72 6f 63 65 64 |:integer|;.proced|
|00001a70| 75 72 65 20 73 65 74 5f | 72 61 6e 64 6f 6d 5f 73 |ure set_|random_s|
|00001a80| 65 65 64 28 73 65 65 64 | 3a 6c 6f 6e 67 69 6e 74 |eed(seed|:longint|
|00001a90| 29 3b 0d 70 72 6f 63 65 | 64 75 72 65 20 73 65 74 |);.proce|dure set|
|00001aa0| 75 70 5f 6f 64 3b 0d 66 | 75 6e 63 74 69 6f 6e 20 |up_od;.f|unction |
|00001ab0| 70 6f 77 65 72 28 6e 2c | 6d 3a 6c 6f 6e 67 69 6e |power(n,|m:longin|
|00001ac0| 74 29 3a 6c 6f 6e 67 69 | 6e 74 3b 0d 0d 0d 49 6d |t):longi|nt;...Im|
|00001ad0| 70 6c 65 6d 65 6e 74 61 | 74 69 6f 6e 0d 7b 24 49 |plementa|tion.{$I|
|00001ae0| 20 70 69 78 69 6f 75 6e | 69 74 2e 69 6d 70 2e 70 | pixioun|it.imp.p|
|00001af0| 7d 0d 65 6e 64 2e 7b 75 | 6e 69 74 20 70 69 78 69 |}.end.{u|nit pixi|
|00001b00| 6f 75 6e 69 74 7d 0d 00 | 00 00 00 00 00 00 00 00 |ounit}..|........|
|00001b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001b80| 00 00 01 00 00 00 01 52 | 00 00 00 52 00 00 00 46 |.......R|...R...F|
|00001b90| 65 65 6e 62 69 74 73 2e | 62 6f 75 6e 64 73 2e 62 |eenbits.|bounds.b|
|00001ba0| 6f 74 74 6f 6d 3b 0d 20 | 20 20 20 6c 65 66 74 3a |ottom;. | left:|
|00001bb0| 0b 70 69 78 69 6f 75 6e | 69 74 2e 70 02 00 00 00 |.pixioun|it.p....|
|00001bc0| 54 45 58 54 4d 50 53 20 | 01 00 00 0c 01 18 00 00 |TEXTMPS |........|
|00001bd0| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 0c 01 18 |..TEXTMP|S ......|
|00001be0| 00 00 45 65 00 00 00 00 | 00 00 00 00 00 00 00 00 |..Ee....|........|
|00001bf0| 00 00 9f f6 d3 fa 00 00 | 1a 87 00 00 01 98 6f 77 |........|......ow|
|00001c00| 3a 3d 4e 65 77 57 69 6e | 64 6f 77 28 6e 69 6c 2c |:=NewWin|dow(nil,|
|00001c10| 77 62 6f 75 6e 64 73 2c | 27 44 69 74 68 65 72 20 |wbounds,|'Dither |
|00001c20| 74 65 73 74 73 27 2c 74 | 72 75 65 2c 0d 20 20 20 |tests',t|rue,. |
|00001c30| 20 20 20 20 20 64 62 6f | 78 50 72 6f 63 2c 70 6f | dbo|xProc,po|
|00001c40| 69 6e 74 65 72 28 2d 31 | 29 2c 66 61 6c 73 65 2c |inter(-1|),false,|
|00001c50| 30 29 3b 0d 73 65 74 70 | 6f 72 74 28 6d 61 69 6e |0);.setp|ort(main|
|00001c60| 77 69 6e 64 6f 77 29 3b | 0d 67 65 74 66 6e 75 6d |window);|.getfnum|
|00001c70| 28 27 4d 6f 6e 61 63 6f | 27 2c 66 6f 6e 74 6e 75 |('Monaco|',fontnu|
|00001c80| 00 00 00 02 00 00 00 00 | 00 48 00 0a 43 6f 75 72 |........|.H..Cour|
|00001c90| 69 65 72 00 00 00 00 00 | 00 14 00 00 00 00 03 eb |ier.....|........|
|00001ca0| ff ff 00 00 00 36 00 00 | 00 00 00 00 00 06 00 04 |.....6..|........|
|00001cb0| 00 27 00 17 01 38 01 fb | 00 66 00 43 01 77 02 27 |.'...8..|.f.C.w.'|
|00001cc0| a0 41 b1 db 00 00 00 10 | 00 00 00 10 00 00 02 89 |.A......|........|
|00001cd0| 01 00 00 00 01 00 00 00 | 01 52 00 00 00 52 00 00 |........|.R...R..|
|00001ce0| 00 46 00 02 2e b0 02 f2 | 00 00 00 1c 00 46 00 01 |.F......|.....F..|
|00001cf0| 45 51 45 44 00 00 00 12 | 4d 50 53 52 00 00 00 1e |EQED....|MPSR....|
|00001d00| 03 eb ff ff 00 00 00 00 | 00 00 00 00 03 ed ff ff |........|........|
|00001d10| 00 00 00 06 00 03 2f ca | 00 00 00 00 00 00 00 00 |....../.|........|
|00001d20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00001d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+