I find TGA very useful when in need of image output and without easy access to a proper image lib. TGAs are trivial to output just by writing RGB values to a file with a simple header, no encoder needed.
I am so glad that many image viewers/editors still load TGA, my computer has gigabytes of them!
Spec here: http://www.paulbourke.net/dataformats/tga/