ReadPixelFast

Blitz3D Forums/Blitz3D Programming/ReadPixelFast

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.

The first two lines already look like trouble:
Function ColorImage(x%,y%,scolor)

	Local oldimage = LoadImage ("gfx/player.png")

It looks likes this function will be called many times for different values of x,y.
But oldimage is being reloaded with every function call. That would explain most of the slowness.
And the previously loaded copy is simply forgotten, which is a memory leak.