FreeImage Userlib (open source project)

Miscellaneous Forums/Blitz Showcase/FreeImage Userlib (open source project)

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.

Something like this should work (replacing the FIToBank in the B+ Version)
FIImage\Pitch=(Ceil(FIImage\Width*4)/4)*4
ImageBank=CreateBank(FIImage\Height*FIImage\Pitch)
FIToBank ImageBank,FIBITMAP,FIImage\Pitch,24,$FF0000,$FF00,$FF,0
LockBuffer ImageBuffer(FIImage\ImageLoc)
For y=0 To FIImage\Height
	Yoff=y*FIImage\Pitch
	For x=0 To FIImage\Width
		WritePixelFast x,y,PeekInt(ImageBank,Yoff+(x*4))
	Next
Next
UnlockBuffer ImageBuffer(FIImage\ImageLoc)
FreeBank ImageBank