Images and Banks

BlitzPlus Forums/BlitzPlus Programming/Images and Banks

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.

ok im getting somewhere due to all the help:)

however testing my code and i get errors after its completed the first line of the image correctly

i thought a bank was a continuous section, or is info placed in the image to take care of a new line?

window = CreateWindow("Test", 100, 200, 640, 480, 0, 11)

temp = LoadImage("test 20 x 2.bmp") ; width and height in pixels
SetBuffer ImageBuffer( temp )
LockBuffer ImageBuffer( temp )
imagebank = LockedPixels()
imagepitch = LockedPitch()
UnlockBuffer ImageBuffer( temp )

Const CONST_StepA = 3
Const CONST_StepB = 4

savingdata = WriteFile("C:\Documents and Settings\Administrator\My Documents\Blitz Progs\newest.txt")
WriteLine savingdata, ImageWidth(temp) : WriteLine savingdata, ImageHeight(temp) ;+ " image height" + " image width"

size = ImageWidth(temp) * ImageHeight(temp) * CONST_StepA
For count = 0 To size - 1 Step CONST_StepA
		peekdata = PeekInt (imagebank, count)
		peekdata = peekdata And $FFFFFF
		;red = ( peekdata Shr 16 ) And $FF
		;green = ( peekdata Shr 8 ) And $FF
		;blue = peekdata And $FF

		WriteLine savingdata, peekdata ;Str red +" "+ Str green +" "+ Str blue
Next		
CloseFile(savingdata)