Each game has conditions you need to fulfill to unlock pictures in the gallery, for example clearing a stage in Commando. Once you meet a certain requirement you must exit the game to unlock the pictures though I suggest you let your lives run out or complete the game before you do as quitting during the game may not unlock it.