I've always found the TGA file format to be the easiest to write out to disk. Bitmaps (BMP) have a lot more header information and while they are not insanely difficult, TGA's only have one big header and then the data comes right afterward, so writing them out is simple.
-nt20