The female in the right-hand picture extended its ovipositor before egg laying. Males and females can be distinguished by their antennae.