A major annoyance for me is saving images from c++. I can’t really find any libraries that I like, they are either too complex for the task or they don’t do what I want them to do. So I have created my own, extremely lightweight image library.
All you need to run this is two files, the cpp file and the header. I chose .tga because it is one of the easiest, straightforward formats to save to.
Here is some example code of saving an image with this library:
This outputs a red image like so:
Anyway, have fun using this in your projects, Here is the download link for the source: Download For more information on the TGA file format visit the following links: http://paulbourke.net/dataformats/tga/ http://en.wikipedia.org/wiki/Truevision_TGA