View Full Version : need for an image saving code (e.g. BMP)

08-13-2011, 10:07 AM
Hello everyone

I have an urgent need for a code that saves an image data to a file readable by any image viewer. I assume a simple format would be BMP but there are probably others, too. The reason that I'm asking here is that probably some of you might have a code that does it and would like to share it with me. I'm compiling and running the program on a computer where I can't install anything, so any installable library wouldn't be the answer. The images would be pretty "ordinary" I guess, 24 bit with no alpha channel.

I haven't found it by googling. Thank you very much if any of you can do this simple favor.

Let me just add that this is not a homework assignment or anything like that (like I said, any commonly readable 24 bit format is good) but my personal project. However, it would make it a lot easier if someone could point me to a right place where I can find this part of it ready (because saving an image is an old trick). I also understand there are people who don't want to give away things that one can make by himself.

08-13-2011, 10:16 AM
You mean googling "BMP source code" didn't show anything useful?

08-14-2011, 12:55 AM
Alright, I didn't try that one, and when I did, there was one code that worked with very little modification. Thanks Salem!