hey,
Im looing for a lib that i can use to open a bitmap, read the contents (pixel by pixel preferably the color in RGB), then write to the file that some pixel is red, blue, or whatever color.
Thanks,
Gr3g
hey,
Im looing for a lib that i can use to open a bitmap, read the contents (pixel by pixel preferably the color in RGB), then write to the file that some pixel is red, blue, or whatever color.
Thanks,
Gr3g
You can use SDL for this, although it's a much more general API than just modifying BMPs.
Here are two examples of my code reading a BMP from a file, making pixel level changes, and then saving the BMP for my up and coming bomberman game. The code in these are not really pretty.. they were made to programatically manipulate BMPs into how I wanted them to look.
http://cvs.sourceforge.net/cgi-bin/v...viewcvs-markup
http://cvs.sourceforge.net/cgi-bin/v...viewcvs-markup
You can get SDL from http://www.libsdl.org if you so choose.