The wiki has information on how to write out a modified bmap as a TGA in C-Script.