Expose PNG and TGA APIs at top of files, move code