home *** CD-ROM | disk | FTP | other *** search
/ Best Tools for JAVA / Best Tools for JAVA.iso / GRAPHICS / BMPWIZ / BMPWIZ.ZIP / RAND.BAS < prev    next >
Unknown  |  1994-01-31  |  1.1 KB

open in: MacOS 8.1     |     Win98     |     DOS

view JSON data     |     view as text

This file was not able to be converted.
This format is not currently supported by dexvert.

ConfidenceProgramDetectionMatch TypeSupport
66% dexvert GW-BASIC (document/gwBasic) ext Supported
66% dexvert GFA-BASIC Atari (other/gfaBASICAtari) ext Supported
1% dexvert Memotech MTX BASIC source (document/memotechMTXBASICSource) ext Unsupported
1% dexvert Amiga BASIC Protected File (other/amigaBASICProtectedFile) ext Unsupported
1% dexvert BAS VBDOS Pro 1.0 Source (other/basVBDOSPro10Source) ext Unsupported
1% dexvert Visual Basic Tokenized Source (other/visualBasicTokenizedSource) ext Unsupported
1% dexvert ZBASIC (other/zbasic) ext Unsupported
100% file data default



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 91 04 00 00 0d 0a 27 20 | 52 61 6e 64 6f 6d 2e 0d |......' |Random..|
|00000010| 0a 27 20 55 73 65 20 72 | 61 6e 64 6f 6d 20 66 75 |.' Use r|andom fu|
|00000020| 6e 63 74 69 6f 6e 20 28 | 72 61 6e 67 65 20 30 20 |nction (|range 0 |
|00000030| 2d 20 31 29 20 74 6f 20 | 6d 6f 64 69 66 79 20 32 |- 1) to |modify 2|
|00000040| 30 25 20 6f 66 20 62 72 | 69 67 68 74 6e 65 73 73 |0% of br|ightness|
|00000050| 2e 0d 0a 27 20 46 6f 72 | 20 61 20 62 65 74 74 65 |...' For| a bette|
|00000060| 72 20 61 6e 64 20 66 61 | 73 74 65 72 20 72 65 73 |r and fa|ster res|
|00000070| 75 6c 74 20 75 73 65 20 | 32 34 20 62 69 74 20 6f |ult use |24 bit o|
|00000080| 75 74 70 75 74 2e 0d 0a | 0d 0a 27 20 49 6e 70 75 |utput...|..' Inpu|
|00000090| 74 3a 09 38 2d 32 34 20 | 62 69 74 0d 0a 27 20 4f |t:.8-24 |bit..' O|
|000000a0| 75 74 70 75 74 3a 09 38 | 2d 32 34 20 62 69 74 20 |utput:.8|-24 bit |
|000000b0| 28 32 34 20 72 72 65 63 | 63 6f 6d 65 6e 64 65 64 |(24 rrec|comended|
|000000c0| 29 0d 0a 0d 0a 27 20 41 | 75 74 68 6f 72 3a 09 41 |)....' A|uthor:.A|
|000000d0| 6e 64 72 65 61 20 42 65 | 6e 6f 6e 69 09 09 09 20 |ndrea Be|noni... |
|000000e0| 72 65 76 3a 09 31 2e 32 | 0d 0a 0d 0a 0d 0a 73 74 |rev:.1.2|......st|
|000000f0| 72 69 6e 67 09 69 6e 70 | 46 69 6c 65 2c 6f 75 74 |ring.inp|File,out|
|00000100| 46 69 6c 65 0d 0a 44 65 | 76 43 6f 6e 09 49 62 6d |File..De|vCon.Ibm|
|00000110| 70 2c 4f 62 6d 70 0d 0a | 52 47 42 09 70 69 78 0d |p,Obmp..|RGB.pix.|
|00000120| 0a 66 6c 6f 61 74 20 20 | 09 78 2c 79 2c 4c 0d 0a |.float |.x,y,L..|
|00000130| 0d 0a 69 6e 70 46 69 6c | 65 3d 22 74 65 73 74 69 |..inpFil|e="testi|
|00000140| 2e 62 6d 70 22 0d 0a 6f | 75 74 46 69 6c 65 3d 22 |.bmp"..o|utFile="|
|00000150| 74 65 73 74 6f 2e 62 6d | 70 22 0d 0a 0d 0a 49 62 |testo.bm|p"....Ib|
|00000160| 6d 70 3d 4c 6f 61 64 49 | 6d 61 67 65 28 69 6e 70 |mp=LoadI|mage(inp|
|00000170| 46 69 6c 65 29 0d 0a 4f | 62 6d 70 3d 43 72 65 61 |File)..O|bmp=Crea|
|00000180| 74 65 49 6d 61 67 65 28 | 49 62 6d 70 2e 57 69 64 |teImage(|Ibmp.Wid|
|00000190| 74 68 2c 49 62 6d 70 2e | 48 65 69 67 68 74 2c 49 |th,Ibmp.|Height,I|
|000001a0| 62 6d 70 2e 42 69 74 43 | 6f 75 6e 74 29 0d 0a 20 |bmp.BitC|ount).. |
|000001b0| 09 09 09 09 27 20 6f 72 | 20 73 75 62 73 74 69 74 |....' or| substit|
|000001c0| 75 74 65 20 49 62 6d 70 | 2e 42 69 74 43 6f 75 6e |ute Ibmp|.BitCoun|
|000001d0| 74 20 77 69 74 68 20 32 | 34 0d 0a 0d 0a 69 66 28 |t with 2|4....if(|
|000001e0| 28 49 62 6d 70 2e 42 69 | 74 43 6f 75 6e 74 3d 38 |(Ibmp.Bi|tCount=8|
|000001f0| 29 09 7c 28 49 62 6d 70 | 2e 42 69 74 43 6f 75 6e |).|(Ibmp|.BitCoun|
|00000200| 74 3d 34 29 29 09 09 27 | 20 69 66 20 34 20 6f 72 |t=4))..'| if 4 or|
|00000210| 20 38 20 62 69 74 20 63 | 6f 70 79 20 70 61 6c 65 | 8 bit c|opy pale|
|00000220| 74 74 65 0d 0a 20 20 20 | 46 6f 72 20 79 3d 30 20 |tte.. |For y=0 |
|00000230| 20 74 6f 20 32 35 35 09 | 09 09 0d 0a 20 20 20 20 | to 255.|.... |
|00000240| 20 20 70 69 78 3d 47 65 | 74 50 61 6c 65 74 74 65 | pix=Ge|tPalette|
|00000250| 28 49 62 6d 70 2c 79 29 | 0d 0a 20 20 20 20 20 20 |(Ibmp,y)|.. |
|00000260| 53 65 74 50 61 6c 65 74 | 74 65 28 4f 62 6d 70 2c |SetPalet|te(Obmp,|
|00000270| 79 2c 70 69 78 29 0d 0a | 20 20 20 6e 65 78 74 20 |y,pix)..| next |
|00000280| 79 0d 0a 65 6e 64 69 66 | 0d 0a 0d 0a 46 6f 72 20 |y..endif|....For |
|00000290| 79 3d 30 20 74 6f 20 49 | 62 6d 70 2e 48 65 69 67 |y=0 to I|bmp.Heig|
|000002a0| 68 74 2d 31 0d 0a 20 20 | 20 46 6f 72 20 78 3d 30 |ht-1.. | For x=0|
|000002b0| 20 74 6f 20 49 62 6d 70 | 2e 57 69 64 74 68 2d 31 | to Ibmp|.Width-1|
|000002c0| 0d 0a 20 20 20 20 20 20 | 69 66 28 52 61 6e 64 28 |.. |if(Rand(|
|000002d0| 31 29 3e 2e 36 29 09 09 | 09 09 27 20 6d 6f 64 69 |1)>.6)..|..' modi|
|000002e0| 66 79 20 69 6d 61 67 65 | 20 34 30 25 0d 0a 20 20 |fy image| 40%.. |
|000002f0| 20 20 20 20 20 20 20 4c | 3d 31 0d 0a 20 20 20 20 | L|=1.. |
|00000300| 20 20 65 6c 73 65 0d 0a | 20 20 20 20 20 20 20 20 | else..| |
|00000310| 20 4c 3d 2e 38 0d 0a 20 | 20 20 20 20 20 65 6e 64 | L=.8.. | end|
|00000320| 69 66 09 09 0d 0a 20 20 | 20 20 20 20 70 69 78 3d |if.... | pix=|
|00000330| 47 65 74 50 69 78 65 6c | 28 49 62 6d 70 2c 78 2c |GetPixel|(Ibmp,x,|
|00000340| 79 29 0d 0a 20 20 20 20 | 20 20 70 69 78 2e 52 65 |y).. | pix.Re|
|00000350| 64 3d 70 69 78 2e 52 65 | 64 2a 4c 0d 0a 20 20 20 |d=pix.Re|d*L.. |
|00000360| 20 20 20 70 69 78 2e 47 | 72 65 65 6e 3d 70 69 78 | pix.G|reen=pix|
|00000370| 2e 47 72 65 65 6e 2a 4c | 0d 0a 20 20 20 20 20 20 |.Green*L|.. |
|00000380| 70 69 78 2e 42 6c 75 65 | 3d 70 69 78 2e 42 6c 75 |pix.Blue|=pix.Blu|
|00000390| 65 2a 4c 0d 0a 20 20 20 | 20 20 20 53 65 74 50 69 |e*L.. | SetPi|
|000003a0| 78 65 6c 28 4f 62 6d 70 | 2c 78 2c 79 2c 70 69 78 |xel(Obmp|,x,y,pix|
|000003b0| 29 0d 0a 20 20 20 4e 65 | 78 74 20 78 0d 0a 20 20 |).. Ne|xt x.. |
|000003c0| 20 69 66 20 28 20 79 25 | 31 36 3d 30 29 0d 0a 20 | if ( y%|16=0).. |
|000003d0| 20 20 20 20 20 44 73 70 | 57 68 69 6c 65 28 22 52 | Dsp|While("R|
|000003e0| 61 6e 64 22 2c 31 30 30 | 2f 49 62 6d 70 2e 48 65 |and",100|/Ibmp.He|
|000003f0| 69 67 68 74 2a 79 29 0d | 0a 20 20 20 20 20 20 50 |ight*y).|. P|
|00000400| 72 65 76 69 65 77 28 4f | 62 6d 70 2c 22 4f 75 74 |review(O|bmp,"Out|
|00000410| 70 75 74 22 2c 35 2c 35 | 2c 4f 62 6d 70 2e 57 69 |put",5,5|,Obmp.Wi|
|00000420| 64 74 68 2b 31 30 2c 4f | 62 6d 70 2e 48 65 69 67 |dth+10,O|bmp.Heig|
|00000430| 68 74 2b 33 30 29 09 0d | 0a 20 20 20 65 6e 64 69 |ht+30)..|. endi|
|00000440| 66 0d 0a 4e 65 78 74 20 | 79 0d 0a 53 61 76 65 49 |f..Next |y..SaveI|
|00000450| 6d 61 67 65 28 4f 62 6d | 70 2c 6f 75 74 46 69 6c |mage(Obm|p,outFil|
|00000460| 65 29 0d 0a 44 73 70 57 | 68 69 6c 65 28 22 52 61 |e)..DspW|hile("Ra|
|00000470| 6e 64 22 2c 31 30 30 2f | 49 62 6d 70 2e 48 65 69 |nd",100/|Ibmp.Hei|
|00000480| 67 68 74 2a 79 29 0d 0a | 44 73 70 4d 65 73 28 22 |ght*y)..|DspMes("|
|00000490| 45 6e 64 22 29 | |End") | |
+--------+-------------------------+-------------------------+--------+--------+