1. Using .bmp files in Euphoria (Windows)

Michael Lester

I have a number of .bmp files that I us as images in a program I am writing 
and I have been putting these in my program by hand (see example below).

This was fine for simple images but is getting a little complicated as the
images get more complex.

I saw the utility program INCBM but I haven't figured out how to make it work
from windows.

My goal is to somhow create an includable file so that the images are imbedded
in the executable.

Any ideas??

Thanks.

	sequence p31,p32,p33,p34,p35,p36,p37,p38,p39,p40			
		p1= repeat(0,40)
		p2 = 0 & repeat(1,38) & 0
		p3 = 0 & repeat(1,38) & 0
		p4= 0 & 1 & 1 & repeat(2,29) & repeat(1,7) & 0 
		p5= 0 & 1 & 1 & repeat(2,28) & repeat(1,8) & 0 
		p6= 0 & 1 & 1 & repeat(2,27) & repeat(1,9) & 0 
		p7= 0 & 1 & 1 & repeat(2,26) & repeat(1,10) & 0 
		p8= 0 & 1 & 1 & repeat(2,25) & repeat(1,8)& repeat(4,1) & 1 & 1 & 0 
		p9= 0 & 1 & 1 & repeat(2,24) & repeat(1,8)& repeat(4,2) & 1 & 1 & 0 
		p10= 0 & 1 & 1 & repeat(2,23) & repeat(1,8)& repeat(4,3) & 1 & 1 & 0 
		p11= 0 & 1 & 1 & repeat(2,22) & repeat(1,8)& repeat(4,4) & 1 & 1 & 0 
		p12= 0 & 1 & 1 & repeat(2,21) & repeat(1,8)& repeat(4,5) & 1 & 1 & 0 
		p13= 0 & 1 & 1 & repeat(2,20) & repeat(1,8)& repeat(4,6) & 1 & 1 & 0 
		p14= 0 & 1 & 1 & repeat(2,19) & repeat(1,8)& repeat(4,7) & 1 & 1 & 0 
p15= 0 & 1 & 1 & repeat(2,11) & repeat(0,12) & repeat(1,3)& repeat(4,8) & 1 &
1 & 0
p16= 0 & 1 & 1 & repeat(2,11) & repeat(0,12) & repeat(1,2)& repeat(4,9) & 1 &
1 & 0
p17= 0 & 1 & 1 & repeat(2,11) & 0 & 0 & repeat(1,8)& 0 & 0 & repeat(1,1)&
repeat(4,10) & 1 & 1 & 0
p18= 0 & 1 & 1 & repeat(2,11) & 0 & 0 & repeat(1,8)& 0 & 0 &  repeat(4,11) & 1
& 1 & 0
p19=  0 & 1 & 1 & repeat(2,11) & 0 & 0 & repeat(1,8)& 0 & 0 &  repeat(4,11) &
1 & 1 & 0
p20=  0 & 1 & 1 & repeat(2,11) & 0 & 0 & repeat(1,8)& 0 & 0 &  repeat(4,11) &
1 & 1 & 0
p21=  0 & 1 & 1 & repeat(2,11) & 0 & 0 & repeat(1,8)& 0 & 0 &  repeat(4,11) &
1 & 1 & 0
p22=  0 & 1 & 1 & repeat(2,11) & 0 & 0 & repeat(1,8)& 0 & 0 &  repeat(4,11) &
1 & 1 & 0
p23=  0 & 1 & 1 & repeat(2,10) & 1 & 0 & 0 & repeat(1,8)& 0 & 0 &
repeat(4,11)& 1 & 1 & 0
		p24= 0 & 1 & 1 & repeat(2,9) & 1 & 1 & repeat(0,12) & repeat(4,11)& 1 & 1 & 0 
p25= 0 & 1 & 1 & repeat(2,8) & 1 & 1 & 1 & repeat(0,12) & repeat(4,11)& 1 & 1
& 0
		p26= 0 & 1 & 1 & repeat(2,7) & repeat(1,8)&repeat(4,19) &1&1& 0 
		p27=  0 & 1 & 1 & repeat(2,6) & repeat(1,8)&repeat(4,20) &1&1& 0 
		p28=  0 & 1 & 1 & repeat(2,5) & repeat(1,8)&repeat(4,21) &1&1& 0 
		p29=  0 & 1 & 1 & repeat(2,4) & repeat(1,8)&repeat(4,22) &1&1& 0 
		p30=  0 & 1 & 1 & repeat(2,3) & repeat(1,8)&repeat(4,23) &1&1& 0 
		p31=  0 & 1 & 1 & repeat(2,2) & repeat(1,8)&repeat(4,24) &1&1& 0 
		p32 = 0 & 1 & 1 & repeat(2,1) & repeat(1,8)&repeat(4,25) &1&1& 0 
		p33=  0 & 1 & 1 & repeat(1,8)&repeat(4,26) &1&1& 0 
		p34= 0 & 1 & 1 & repeat(1,7)&repeat(4,27) &1&1& 0 
		p35= 0 & 1 & 1 & repeat(1,6)&repeat(4,28) &1&1& 0 
		p36= 0 & 1 & 1 & repeat(1,5)&repeat(4,29) &1&1& 0 
		p37= 0 & 1 & 1 & repeat(1,4)&repeat(4,30) &1&1& 0 
		p38 = 0 & repeat(1,39)& 0 
		p39 = 0 & repeat(1,38)& 0 
		p40 = repeat(0,39) 
		
		  -- the pixels data
		  pixels = {
	p1,p2,p3,p4,p5,p6,p7,p8,p9,p10,
	p11,p12,p13,p14,p15,p16,p17,p18,p19,p20,
	p21,p22,p23,p24,p25,p26,p27,p28,p29,p30,
	p31,p32,p33,p34,p35,p36,p37,p38,p39,p40 	   
}	

-- this creates the image
lsBox = createDIB( {pal, pixels} )

new topic     » topic index » view message » categorize

2. Re: Using .bmp files in Euphoria (Windows)

I 'might' still have this up. It used older versions of win32lib, and, of
course, you don't have the hardware... but 29 bitmaps, and a WAV, all in one
resource file, which is bindable.

http://www.king.igs.net/~wolfritz/win-ther3.zip

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu