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

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


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

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, Thu Mar 16 13:02:25 1989, modified Thu Mar 16 13:02:25 1989, creator 'MPS ', type ASCII, 2942 bytes "reduceunit.p" , at 0xbfe 382 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 0c 72 65 64 75 63 65 | 75 6e 69 74 2e 70 00 00 |..reduce|unit.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 0b 7e 00 | 00 01 7e a0 45 a7 31 a0 |......~.|..~.E.1.|
|00000060| 45 a7 31 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |E.1.....|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 18 89 00 00 |........|........|
|00000080| 75 6e 69 74 20 72 65 64 | 75 63 65 75 6e 69 74 3b |unit red|uceunit;|
|00000090| 0d 7b 72 65 64 75 63 65 | 20 69 6d 61 67 65 73 20 |.{reduce| images |
|000000a0| 62 79 20 74 77 6f 2d 77 | 61 79 20 61 76 65 72 61 |by two-w|ay avera|
|000000b0| 67 69 6e 67 7d 0d 69 6e | 74 65 72 66 61 63 65 0d |ging}.in|terface.|
|000000c0| 75 73 65 73 20 6d 65 6d | 74 79 70 65 73 2c 71 75 |uses mem|types,qu|
|000000d0| 69 63 6b 64 72 61 77 2c | 6f 73 69 6e 74 66 2c 74 |ickdraw,|osintf,t|
|000000e0| 6f 6f 6c 69 6e 74 66 2c | 70 61 63 6b 69 6e 74 66 |oolintf,|packintf|
|000000f0| 2c 66 69 78 6d 61 74 68 | 2c 0d 09 09 62 69 74 70 |,fixmath|,...bitp|
|00000100| 61 63 6b 75 6e 69 74 2c | 73 68 6f 72 74 66 69 78 |ackunit,|shortfix|
|00000110| 75 6e 69 74 3b 0d 0d 70 | 72 6f 63 65 64 75 72 65 |unit;..p|rocedure|
|00000120| 20 72 65 64 75 63 65 5f | 75 6e 70 61 63 6b 28 09 | reduce_|unpack(.|
|00000130| 73 6f 75 72 63 65 3a 70 | 74 72 3b 0d 09 09 09 09 |source:p|tr;.....|
|00000140| 09 09 09 73 6f 75 72 63 | 65 5f 62 69 74 73 5f 70 |...sourc|e_bits_p|
|00000150| 65 72 5f 70 69 78 65 6c | 3a 69 6e 74 65 67 65 72 |er_pixel|:integer|
|00000160| 3b 0d 09 09 09 09 09 09 | 09 73 6f 75 72 63 65 5f |;.......|.source_|
|00000170| 69 6d 61 67 65 77 69 64 | 74 68 3a 6c 6f 6e 67 69 |imagewid|th:longi|
|00000180| 6e 74 3b 0d 09 09 09 09 | 09 09 09 64 65 73 74 3a |nt;.....|...dest:|
|00000190| 70 74 72 3b 0d 09 09 09 | 09 09 09 09 64 65 73 74 |ptr;....|....dest|
|000001a0| 5f 6d 61 78 5f 62 79 74 | 65 5f 73 69 7a 65 3a 6c |_max_byt|e_size:l|
|000001b0| 6f 6e 67 69 6e 74 29 3b | 0d 09 09 09 09 09 09 09 |ongint);|........|
|000001c0| 0d 09 09 09 09 09 09 09 | 0d 70 72 6f 63 65 64 75 |........|.procedu|
|000001d0| 72 65 20 72 65 64 75 63 | 65 5f 66 69 78 5f 6d 65 |re reduc|e_fix_me|
|000001e0| 61 6e 28 09 73 6f 75 72 | 63 65 3a 70 74 72 3b 0d |an(.sour|ce:ptr;.|
|000001f0| 09 09 09 09 09 09 09 64 | 65 73 74 3a 70 74 72 3b |.......d|est:ptr;|
|00000200| 0d 09 09 09 09 09 09 09 | 64 65 73 74 5f 6d 61 78 |........|dest_max|
|00000210| 5f 62 79 74 65 5f 73 69 | 7a 65 3a 6c 6f 6e 67 69 |_byte_si|ze:longi|
|00000220| 6e 74 3b 0d 09 09 09 09 | 09 09 09 6e 72 65 64 75 |nt;.....|...nredu|
|00000230| 63 65 3a 69 6e 74 65 67 | 65 72 3b 0d 09 09 09 09 |ce:integ|er;.....|
|00000240| 09 09 09 73 6f 75 72 63 | 65 69 6d 61 67 65 77 69 |...sourc|eimagewi|
|00000250| 64 74 68 3a 6c 6f 6e 67 | 69 6e 74 3b 0d 09 09 09 |dth:long|int;....|
|00000260| 09 09 09 09 73 6f 75 72 | 63 65 69 6d 61 67 65 6c |....sour|ceimagel|
|00000270| 65 6e 67 74 68 3a 6c 6f | 6e 67 69 6e 74 3b 0d 09 |ength:lo|ngint;..|
|00000280| 09 09 09 09 09 09 73 6f | 75 72 63 65 72 6f 77 3a |......so|urcerow:|
|00000290| 6c 6f 6e 67 69 6e 74 3b | 0d 09 09 09 09 09 09 09 |longint;|........|
|000002a0| 76 61 72 20 64 65 73 74 | 72 6f 77 3a 6c 6f 6e 67 |var dest|row:long|
|000002b0| 69 6e 74 3b 0d 09 09 09 | 09 09 09 09 76 61 72 20 |int;....|....var |
|000002c0| 64 65 73 74 61 76 65 63 | 6f 75 6e 74 3a 69 6e 74 |destavec|ount:int|
|000002d0| 65 67 65 72 3b 0d 09 09 | 09 09 09 09 09 76 61 72 |eger;...|.....var|
|000002e0| 20 77 72 69 74 65 64 65 | 73 74 72 6f 77 3a 62 6f | writede|strow:bo|
|000002f0| 6f 6c 65 61 6e 29 3b 0d | 09 09 09 09 09 09 09 0d |olean);.|........|
|00000300| 66 75 6e 63 74 69 6f 6e | 20 72 65 64 75 63 65 64 |function| reduced|
|00000310| 5f 73 69 7a 65 28 69 69 | 3a 6c 6f 6e 67 69 6e 74 |_size(ii|:longint|
|00000320| 3b 6e 72 65 64 75 63 65 | 3a 69 6e 74 65 67 65 72 |;nreduce|:integer|
|00000330| 29 3a 6c 6f 6e 67 69 6e | 74 3b 0d 0d 69 6d 70 6c |):longin|t;..impl|
|00000340| 65 6d 65 6e 74 61 74 69 | 6f 6e 0d 0d 66 75 6e 63 |ementati|on..func|
|00000350| 74 69 6f 6e 20 6d 61 78 | 28 69 2c 6a 3a 6c 6f 6e |tion max|(i,j:lon|
|00000360| 67 69 6e 74 29 3a 6c 6f | 6e 67 69 6e 74 3b 0d 62 |gint):lo|ngint;.b|
|00000370| 65 67 69 6e 0d 69 66 20 | 69 3e 6a 20 74 68 65 6e |egin.if |i>j then|
|00000380| 20 6d 61 78 3a 3d 69 20 | 65 6c 73 65 20 6d 61 78 | max:=i |else max|
|00000390| 3a 3d 6a 3b 0d 65 6e 64 | 3b 0d 66 75 6e 63 74 69 |:=j;.end|;.functi|
|000003a0| 6f 6e 20 6d 69 6e 28 69 | 2c 6a 3a 6c 6f 6e 67 69 |on min(i|,j:longi|
|000003b0| 6e 74 29 3a 6c 6f 6e 67 | 69 6e 74 3b 0d 62 65 67 |nt):long|int;.beg|
|000003c0| 69 6e 0d 69 66 20 69 3c | 6a 20 74 68 65 6e 20 6d |in.if i<|j then m|
|000003d0| 69 6e 3a 3d 69 20 65 6c | 73 65 20 6d 69 6e 3a 3d |in:=i el|se min:=|
|000003e0| 6a 3b 0d 65 6e 64 3b 0d | 0d 66 75 6e 63 74 69 6f |j;.end;.|.functio|
|000003f0| 6e 20 72 65 64 75 63 65 | 64 5f 73 69 7a 65 28 69 |n reduce|d_size(i|
|00000400| 69 3a 6c 6f 6e 67 69 6e | 74 3b 6e 72 65 64 75 63 |i:longin|t;nreduc|
|00000410| 65 3a 69 6e 74 65 67 65 | 72 29 3a 6c 6f 6e 67 69 |e:intege|r):longi|
|00000420| 6e 74 3b 0d 7b 64 69 76 | 69 73 69 6f 6e 20 77 69 |nt;.{div|ision wi|
|00000430| 74 68 20 72 6f 75 6e 64 | 20 75 70 7d 0d 62 65 67 |th round| up}.beg|
|00000440| 69 6e 0d 72 65 64 75 63 | 65 64 5f 73 69 7a 65 3a |in.reduc|ed_size:|
|00000450| 3d 28 69 69 2b 6e 72 65 | 64 75 63 65 2d 31 29 20 |=(ii+nre|duce-1) |
|00000460| 64 69 76 20 6e 72 65 64 | 75 63 65 3b 0d 65 6e 64 |div nred|uce;.end|
|00000470| 3b 7b 70 72 6f 63 7d 0d | 0d 70 72 6f 63 65 64 75 |;{proc}.|.procedu|
|00000480| 72 65 20 72 65 64 75 63 | 65 5f 75 6e 70 61 63 6b |re reduc|e_unpack|
|00000490| 28 09 73 6f 75 72 63 65 | 3a 70 74 72 3b 0d 09 09 |(.source|:ptr;...|
|000004a0| 09 09 09 09 09 73 6f 75 | 72 63 65 5f 62 69 74 73 |.....sou|rce_bits|
|000004b0| 5f 70 65 72 5f 70 69 78 | 65 6c 3a 69 6e 74 65 67 |_per_pix|el:integ|
|000004c0| 65 72 3b 0d 09 09 09 09 | 09 09 09 73 6f 75 72 63 |er;.....|...sourc|
|000004d0| 65 5f 69 6d 61 67 65 77 | 69 64 74 68 3a 6c 6f 6e |e_imagew|idth:lon|
|000004e0| 67 69 6e 74 3b 0d 09 09 | 09 09 09 09 09 64 65 73 |gint;...|.....des|
|000004f0| 74 3a 70 74 72 3b 0d 09 | 09 09 09 09 09 09 64 65 |t:ptr;..|......de|
|00000500| 73 74 5f 6d 61 78 5f 62 | 79 74 65 5f 73 69 7a 65 |st_max_b|yte_size|
|00000510| 3a 6c 6f 6e 67 69 6e 74 | 29 3b 0d 76 61 72 0d 09 |:longint|);.var..|
|00000520| 6c 6f 77 5f 62 69 74 5f | 61 6c 69 67 6e 6d 65 6e |low_bit_|alignmen|
|00000530| 74 3a 69 6e 74 65 67 65 | 72 3b 0d 09 64 65 73 74 |t:intege|r;..dest|
|00000540| 5f 69 74 65 6d 5f 63 6f | 75 6e 74 3a 6c 6f 6e 67 |_item_co|unt:long|
|00000550| 69 6e 74 3b 0d 62 65 67 | 69 6e 0d 6c 6f 77 5f 62 |int;.beg|in.low_b|
|00000560| 69 74 5f 61 6c 69 67 6e | 6d 65 6e 74 3a 3d 73 68 |it_align|ment:=sh|
|00000570| 6f 72 74 66 69 78 5f 66 | 72 61 63 74 69 6f 6e 5f |ortfix_f|raction_|
|00000580| 64 69 67 69 74 73 2d 73 | 6f 75 72 63 65 5f 62 69 |digits-s|ource_bi|
|00000590| 74 73 5f 70 65 72 5f 70 | 69 78 65 6c 3b 0d 0d 62 |ts_per_p|ixel;..b|
|000005a0| 69 74 73 74 72 65 61 6d | 5f 75 6e 70 61 63 6b 28 |itstream|_unpack(|
|000005b0| 73 6f 75 72 63 65 2c 73 | 6f 75 72 63 65 5f 69 6d |source,s|ource_im|
|000005c0| 61 67 65 77 69 64 74 68 | 2c 73 6f 75 72 63 65 5f |agewidth|,source_|
|000005d0| 62 69 74 73 5f 70 65 72 | 5f 70 69 78 65 6c 2c 0d |bits_per|_pixel,.|
|000005e0| 09 09 09 09 64 65 73 74 | 2c 64 65 73 74 5f 6d 61 |....dest|,dest_ma|
|000005f0| 78 5f 62 79 74 65 5f 73 | 69 7a 65 2c 0d 09 09 09 |x_byte_s|ize,....|
|00000600| 09 64 65 73 74 5f 69 74 | 65 6d 5f 63 6f 75 6e 74 |.dest_it|em_count|
|00000610| 2c 0d 09 09 09 09 73 68 | 6f 72 74 66 69 78 62 79 |,.....sh|ortfixby|
|00000620| 74 65 73 2c 0d 09 09 09 | 09 6c 6f 77 5f 62 69 74 |tes,....|.low_bit|
|00000630| 5f 61 6c 69 67 6e 6d 65 | 6e 74 29 3b 0d 65 6e 64 |_alignme|nt);.end|
|00000640| 3b 7b 70 72 6f 63 7d 0d | 0d 70 72 6f 63 65 64 75 |;{proc}.|.procedu|
|00000650| 72 65 20 72 65 64 75 63 | 65 5f 66 69 78 5f 6d 65 |re reduc|e_fix_me|
|00000660| 61 6e 28 09 73 6f 75 72 | 63 65 3a 70 74 72 3b 0d |an(.sour|ce:ptr;.|
|00000670| 09 09 09 09 09 09 09 64 | 65 73 74 3a 70 74 72 3b |.......d|est:ptr;|
|00000680| 0d 09 09 09 09 09 09 09 | 64 65 73 74 5f 6d 61 78 |........|dest_max|
|00000690| 5f 62 79 74 65 5f 73 69 | 7a 65 3a 6c 6f 6e 67 69 |_byte_si|ze:longi|
|000006a0| 6e 74 3b 0d 09 09 09 09 | 09 09 09 6e 72 65 64 75 |nt;.....|...nredu|
|000006b0| 63 65 3a 69 6e 74 65 67 | 65 72 3b 0d 09 09 09 09 |ce:integ|er;.....|
|000006c0| 09 09 09 73 6f 75 72 63 | 65 69 6d 61 67 65 77 69 |...sourc|eimagewi|
|000006d0| 64 74 68 3a 6c 6f 6e 67 | 69 6e 74 3b 0d 09 09 09 |dth:long|int;....|
|000006e0| 09 09 09 09 73 6f 75 72 | 63 65 69 6d 61 67 65 6c |....sour|ceimagel|
|000006f0| 65 6e 67 74 68 3a 6c 6f | 6e 67 69 6e 74 3b 0d 09 |ength:lo|ngint;..|
|00000700| 09 09 09 09 09 09 73 6f | 75 72 63 65 72 6f 77 3a |......so|urcerow:|
|00000710| 6c 6f 6e 67 69 6e 74 3b | 0d 09 09 09 09 09 09 09 |longint;|........|
|00000720| 76 61 72 20 64 65 73 74 | 72 6f 77 3a 6c 6f 6e 67 |var dest|row:long|
|00000730| 69 6e 74 3b 0d 09 09 09 | 09 09 09 09 76 61 72 20 |int;....|....var |
|00000740| 64 65 73 74 61 76 65 63 | 6f 75 6e 74 3a 69 6e 74 |destavec|ount:int|
|00000750| 65 67 65 72 3b 0d 09 09 | 09 09 09 09 09 76 61 72 |eger;...|.....var|
|00000760| 20 77 72 69 74 65 64 65 | 73 74 72 6f 77 3a 62 6f | writede|strow:bo|
|00000770| 6f 6c 65 61 6e 29 3b 0d | 76 61 72 20 73 74 61 72 |olean);.|var star|
|00000780| 74 64 65 73 74 72 6f 77 | 3a 62 6f 6f 6c 65 61 6e |tdestrow|:boolean|
|00000790| 3b 0d 20 20 20 20 65 6e | 64 64 65 73 74 72 6f 77 |;. en|ddestrow|
|000007a0| 3a 62 6f 6f 6c 65 61 6e | 3b 0d 09 72 6f 77 6d 6f |:boolean|;..rowmo|
|000007b0| 64 3a 69 6e 74 65 67 65 | 72 3b 0d 09 64 65 73 74 |d:intege|r;..dest|
|000007c0| 69 6d 61 67 65 77 69 64 | 74 68 3a 6c 6f 6e 67 69 |imagewid|th:longi|
|000007d0| 6e 74 3b 0d 09 69 2c 6a | 2c 6a 61 2c 6a 62 3a 6c |nt;..i,j|,ja,jb:l|
|000007e0| 6f 6e 67 69 6e 74 3b 0d | 09 73 75 6d 3a 73 68 6f |ongint;.|.sum:sho|
|000007f0| 72 74 66 69 78 3b 0d 62 | 65 67 69 6e 0d 72 6f 77 |rtfix;.b|egin.row|
|00000800| 6d 6f 64 3a 3d 28 73 6f | 75 72 63 65 72 6f 77 2d |mod:=(so|urcerow-|
|00000810| 31 29 20 6d 6f 64 20 6e | 72 65 64 75 63 65 3b 0d |1) mod n|reduce;.|
|00000820| 73 74 61 72 74 64 65 73 | 74 72 6f 77 3a 3d 28 72 |startdes|trow:=(r|
|00000830| 6f 77 6d 6f 64 3d 30 29 | 3b 0d 65 6e 64 64 65 73 |owmod=0)|;.enddes|
|00000840| 74 72 6f 77 3a 3d 28 72 | 6f 77 6d 6f 64 3d 28 6e |trow:=(r|owmod=(n|
|00000850| 72 65 64 75 63 65 2d 31 | 29 29 20 6f 72 20 28 73 |reduce-1|)) or (s|
|00000860| 6f 75 72 63 65 72 6f 77 | 3d 73 6f 75 72 63 65 69 |ourcerow|=sourcei|
|00000870| 6d 61 67 65 6c 65 6e 67 | 74 68 29 3b 0d 64 65 73 |mageleng|th);.des|
|00000880| 74 69 6d 61 67 65 77 69 | 64 74 68 3a 3d 72 65 64 |timagewi|dth:=red|
|00000890| 75 63 65 64 5f 73 69 7a | 65 28 73 6f 75 72 63 65 |uced_siz|e(source|
|000008a0| 69 6d 61 67 65 77 69 64 | 74 68 2c 6e 72 65 64 75 |imagewid|th,nredu|
|000008b0| 63 65 29 3b 0d 64 65 73 | 74 69 6d 61 67 65 77 69 |ce);.des|timagewi|
|000008c0| 64 74 68 3a 3d 6d 69 6e | 28 64 65 73 74 5f 6d 61 |dth:=min|(dest_ma|
|000008d0| 78 5f 62 79 74 65 5f 73 | 69 7a 65 20 64 69 76 20 |x_byte_s|ize div |
|000008e0| 73 68 6f 72 74 66 69 78 | 62 79 74 65 73 2c 64 65 |shortfix|bytes,de|
|000008f0| 73 74 69 6d 61 67 65 77 | 69 64 74 68 29 3b 0d 0d |stimagew|idth);..|
|00000900| 69 66 20 73 6f 75 72 63 | 65 72 6f 77 3d 31 20 74 |if sourc|erow=1 t|
|00000910| 68 65 6e 20 64 65 73 74 | 72 6f 77 3a 3d 30 3b 0d |hen dest|row:=0;.|
|00000920| 69 66 20 73 74 61 72 74 | 64 65 73 74 72 6f 77 20 |if start|destrow |
|00000930| 74 68 65 6e 0d 20 20 20 | 20 20 62 65 67 69 6e 0d |then. | begin.|
|00000940| 09 20 66 6f 72 20 69 3a | 3d 31 20 74 6f 20 64 65 |. for i:|=1 to de|
|00000950| 73 74 69 6d 61 67 65 77 | 69 64 74 68 20 64 6f 20 |stimagew|idth do |
|00000960| 73 68 6f 72 74 66 69 78 | 61 72 72 61 79 70 74 72 |shortfix|arrayptr|
|00000970| 28 64 65 73 74 29 5e 5b | 69 5d 3a 3d 30 3b 0d 09 |(dest)^[|i]:=0;..|
|00000980| 20 20 64 65 73 74 61 76 | 65 63 6f 75 6e 74 3a 3d | destav|ecount:=|
|00000990| 30 3b 0d 09 20 20 64 65 | 73 74 72 6f 77 3a 3d 64 |0;.. de|strow:=d|
|000009a0| 65 73 74 72 6f 77 2b 31 | 3b 0d 09 20 65 6e 64 3b |estrow+1|;.. end;|
|000009b0| 0d 09 20 0d 64 65 73 74 | 61 76 65 63 6f 75 6e 74 |.. .dest|avecount|
|000009c0| 3a 3d 64 65 73 74 61 76 | 65 63 6f 75 6e 74 2b 31 |:=destav|ecount+1|
|000009d0| 3b 09 20 0d 77 72 69 74 | 65 64 65 73 74 72 6f 77 |;. .writ|edestrow|
|000009e0| 3a 3d 65 6e 64 64 65 73 | 74 72 6f 77 3b 0d 0d 7b |:=enddes|trow;..{|
|000009f0| 68 6f 72 69 7a 6f 6e 74 | 61 6c 20 61 76 65 72 61 |horizont|al avera|
|00000a00| 67 65 7d 0d 6a 61 3a 3d | 31 3b 0d 6a 62 3a 3d 6e |ge}.ja:=|1;.jb:=n|
|00000a10| 72 65 64 75 63 65 3b 0d | 66 6f 72 20 69 3a 3d 31 |reduce;.|for i:=1|
|00000a20| 20 74 6f 20 64 65 73 74 | 69 6d 61 67 65 77 69 64 | to dest|imagewid|
|00000a30| 74 68 20 64 6f 0d 09 62 | 65 67 69 6e 0d 09 73 75 |th do..b|egin..su|
|00000a40| 6d 3a 3d 30 3b 0d 09 66 | 6f 72 20 6a 3a 3d 6a 61 |m:=0;..f|or j:=ja|
|00000a50| 20 74 6f 20 6a 62 20 64 | 6f 0d 09 09 62 65 67 69 | to jb d|o...begi|
|00000a60| 6e 0d 09 09 73 75 6d 3a | 3d 73 75 6d 2b 73 68 6f |n...sum:|=sum+sho|
|00000a70| 72 74 66 69 78 61 72 72 | 61 79 70 74 72 28 73 6f |rtfixarr|ayptr(so|
|00000a80| 75 72 63 65 29 5e 5b 6a | 5d 3b 0d 09 09 65 6e 64 |urce)^[j|];...end|
|00000a90| 3b 0d 09 73 75 6d 3a 3d | 73 75 6d 20 64 69 76 20 |;..sum:=|sum div |
|00000aa0| 28 6a 62 2d 6a 61 2b 31 | 29 3b 0d 09 73 68 6f 72 |(jb-ja+1|);..shor|
|00000ab0| 74 66 69 78 61 72 72 61 | 79 70 74 72 28 64 65 73 |tfixarra|yptr(des|
|00000ac0| 74 29 5e 5b 69 5d 3a 3d | 73 68 6f 72 74 66 69 78 |t)^[i]:=|shortfix|
|00000ad0| 61 72 72 61 79 70 74 72 | 28 64 65 73 74 29 5e 5b |arrayptr|(dest)^[|
|00000ae0| 69 5d 2b 73 75 6d 3b 0d | 09 6a 61 3a 3d 6d 69 6e |i]+sum;.|.ja:=min|
|00000af0| 28 6a 61 2b 6e 72 65 64 | 75 63 65 2c 73 6f 75 72 |(ja+nred|uce,sour|
|00000b00| 63 65 69 6d 61 67 65 77 | 69 64 74 68 29 3b 0d 09 |ceimagew|idth);..|
|00000b10| 6a 62 3a 3d 6d 69 6e 28 | 6a 62 2b 6e 72 65 64 75 |jb:=min(|jb+nredu|
|00000b20| 63 65 2c 73 6f 75 72 63 | 65 69 6d 61 67 65 77 69 |ce,sourc|eimagewi|
|00000b30| 64 74 68 29 3b 0d 09 65 | 6e 64 3b 0d 09 0d 7b 76 |dth);..e|nd;...{v|
|00000b40| 65 72 74 69 63 61 6c 20 | 61 76 65 72 61 67 65 20 |ertical |average |
|00000b50| 61 74 20 65 6e 64 20 6f | 66 20 72 6f 77 7d 0d 69 |at end o|f row}.i|
|00000b60| 66 20 65 6e 64 64 65 73 | 74 72 6f 77 20 74 68 65 |f enddes|trow the|
|00000b70| 6e 0d 09 20 66 6f 72 20 | 69 3a 3d 31 20 74 6f 20 |n.. for |i:=1 to |
|00000b80| 64 65 73 74 69 6d 61 67 | 65 77 69 64 74 68 20 64 |destimag|ewidth d|
|00000b90| 6f 0d 09 20 62 65 67 69 | 6e 0d 09 20 73 68 6f 72 |o.. begi|n.. shor|
|00000ba0| 74 66 69 78 61 72 72 61 | 79 70 74 72 28 64 65 73 |tfixarra|yptr(des|
|00000bb0| 74 29 5e 5b 69 5d 3a 3d | 73 68 6f 72 74 66 69 78 |t)^[i]:=|shortfix|
|00000bc0| 61 72 72 61 79 70 74 72 | 28 64 65 73 74 29 5e 5b |arrayptr|(dest)^[|
|00000bd0| 69 5d 20 64 69 76 20 64 | 65 73 74 61 76 65 63 6f |i] div d|estaveco|
|00000be0| 75 6e 74 3b 0d 09 20 65 | 6e 64 3b 0d 0d 0d 65 6e |unt;.. e|nd;...en|
|00000bf0| 64 3b 7b 70 72 6f 63 7d | 0d 0d 65 6e 64 2e 00 00 |d;{proc}|..end...|
|00000c00| 00 00 01 00 00 00 01 4c | 00 00 00 4c 00 00 00 32 |.......L|...L...2|
|00000c10| 6f 77 20 74 68 65 6e 0d | 20 20 20 20 20 62 65 67 |ow then.| beg|
|00000c20| 69 6e 0d 09 20 66 6f 72 | 20 69 3a 3d 31 20 74 6f |in.. for| i:=1 to|
|00000c30| 0c 72 65 64 75 63 65 75 | 6e 69 74 2e 70 2d 02 00 |.reduceu|nit.p-..|
|00000c40| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 80 01 40 |..TEXTMP|S .....@|
|00000c50| 00 00 54 45 58 54 4d 50 | 53 20 01 00 00 80 01 40 |..TEXTMP|S .....@|
|00000c60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000c70| 00 00 a0 44 48 5d 00 00 | 0b 7e 00 00 01 7e 09 20 |...DH]..|.~...~. |
|00000c80| 0d 77 72 69 74 65 64 65 | 73 74 72 6f 77 3a 3d 65 |.writede|strow:=e|
|00000c90| 6e 64 64 65 73 74 72 6f | 77 3b 0d 0d 6a 61 3a 3d |nddestro|w;..ja:=|
|00000ca0| 31 3b 0d 6a 62 3a 3d 6e | 72 65 64 75 63 65 3b 0d |1;.jb:=n|reduce;.|
|00000cb0| 66 6f 72 20 69 3a 3d 31 | 20 74 6f 20 64 65 73 74 |for i:=1| to dest|
|00000cc0| 69 6d 61 67 65 77 69 64 | 74 68 20 64 6f 0d 09 62 |imagewid|th do..b|
|00000cd0| 65 67 69 6e 0d 09 73 75 | 6d 3a 3d 30 3b 0d 09 0d |egin..su|m:=0;...|
|00000ce0| 09 6a 61 3a 3d 6d 69 6e | 28 6a 61 2b 6e 72 65 64 |.ja:=min|(ja+nred|
|00000cf0| 75 63 65 2c 64 65 73 74 | 69 6d 61 67 65 77 69 64 |uce,dest|imagewid|
|00000d00| 00 00 00 48 00 09 4d 6f | 6e 61 63 6f 00 ee 00 00 |...H..Mo|naco....|
|00000d10| 00 48 00 00 00 0d 00 00 | 00 40 5e d8 00 06 00 01 |.H......|.@^.....|
|00000d20| 00 45 00 13 00 70 00 06 | 00 04 00 29 00 03 00 c6 |.E...p..|...)....|
|00000d30| 01 f9 00 29 00 03 00 c6 | 01 f9 a0 45 6e f1 00 00 |...)....|...En...|
|00000d40| 00 14 00 00 00 14 00 00 | 00 00 01 00 00 00 01 00 |........|........|
|00000d50| 00 00 01 4c 00 00 00 4c | 00 00 00 32 00 02 2e b0 |...L...L|...2....|
|00000d60| 04 0c 00 00 00 1c 00 32 | 00 00 4d 50 53 52 00 00 |.......2|..MPSR..|
|00000d70| 00 0a 03 ed ff ff 00 00 | 00 00 00 03 30 52 00 00 |........|....0R..|
+--------+-------------------------+-------------------------+--------+--------+