Game Development Community

How can I read and modify pixels in a bitmap?

by John Klimek · in Torque Game Builder · 02/06/2007 (8:10 am) · 1 replies

I'd like to read in a bitmap (eg. Jpeg, PNG, etc) and store it in memory. Then I'd like to read pixels from this bitmap and create a quad tree based on this.

Finally, during the game, I'd like to modify this bitmap (in memory) by drawing circles on it (eg. deformation).

How can I do this? (in the C++ engine)

I think I need to use pixmaps but I'm not familar with them.

Thanks in advance for any help!

#1
02/07/2007 (7:32 am)
Well your starting point would be to look into GBitmap and the resource manager.
GBitmap gives you full access to bitmap pixels and should be straight forward from there.