MixImages function help

BlitzPlus Forums/BlitzPlus Programming/MixImages function help

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.

Hello everybody! I need an help. I need to speed up a little this function...can anyone help me? Thanks!
Function MixImages(mix,ima1,ima2)

	b1=ImageBuffer(ima1)
	b2=ImageBuffer(ima2)
	bm=ImageBuffer(mix)

	LockBuffer b1
	LockBuffer b2
	LockBuffer bm
	
	For y=0 To Screen_Height
		For x=0 To Screen_Width 
			c1=ReadPixelFast(x,y,b1)
			c2=ReadPixelFast(x,y,b2)
			WritePixelFast x,y,c1+c2,bm
		Next
	Next

	UnlockBuffer bm
	UnlockBuffer b2
	UnlockBuffer b1
	
End Function