Image Strip

BlitzPlus Forums/BlitzPlus Programming/Image Strip

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.. I presume the filenames are something like earth000.jpg ... earth099.jpg.

This bit of code will create a bitmap 2560 x 2560 in size containing 100 256x256 images.


imgStrip = CreateImage ( 2560, 2560 )

frame = 0
For y = 0 To 9
	For x = 0 To 9
		SetBuffer ImageBuffer ( imgStrip )
	
		fnum$ = Right$("000"+frame,3)
		fname$ = "earth" + fnum$ + ".jpg"
	
		imgFrame = LoadImage ( fname$ )
		SetBuffer ImageBuffer ( imgStrip )

		DrawImage imgFrame, 256*x, 256*y
		FreeImage ( imgFrame )
		frame = frame + 1
	Next
Next

SaveImage ( imgstrip, "earthanim.bmp" )