PNG gives you everything that TGA and JPG give you. Alpha Transparency, Compressed Size, and on top of it its lossless. Of course, JPG or TGA are also valid options, my concern would be with JPG's lossly compression if you did manage to get a pattern that would allow for artifacts.

Also, looking at your code, you save the image to a standard file and then save/load it accordingly. You don't have to do this, and can simply load/save directly to your main buffer. This will save on some overhead and fix any problems associated with drive size and writes issues.

One final thing, I wrote a quick version of your loader in FPC (extracts all info and the image file) and the JPG's don't load properly with the standard FPC libs. They are fine when I extract them to a file, but not fine when loaded within the TJPGImage object. So TGA or PNG would be better if you want support through native libraries in FPC.