whats wrong

Blitz3D Forums/Blitz3D Programming/whats wrong

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.


Global IMAGE%

Graphics 800,600,32,2 	; FORCE a WINDOWED PANE

image = CreateImage(800,600)
SetBuffer(ImageBuffer(image))
Cls
;-------- DRAW SOME RANDOM STUFF ------------------
For i=0 To 1000
	Color Rnd(255),Rnd(255),Rnd(255)
	Line Rnd(800),Rnd(600),Rnd(800),Rnd(600)
	
Next

; DEMO SAVE IMAGE __ NOTE: IMAGEBUFFER
SaveBuffer(ImageBuffer(image),"c:\temp.bmp")


SetBuffer(BackBuffer())


While Not KeyHit(1)
	Cls
	DrawImage image,0,0
	Flip
Wend
End





; TO LOAD AN IMAGE 
image = LoadImage("c:\temp.bmp")