png is probably your best choice (non-lossy, still allows some compression) .
jpg's should be avoided for 2 reasons here:
- lossy compression. you won't get exactly the same pixels on a different machine or a with a different program.
- compression artefacts. jpg processes 8x8 pixels patches, which leaves a border, almost invisible to the human eye, but if you try LBPH face-reco on this, you get clear artefacts (edges) that get in your way.