When I read selfie, I was thinking of one of those motion-based selfies where it's really a short video. And from the video, you can extract those measurements. I'm assuming it wasn't extracted from the passport photo, but rather the passport photo was used to verify that the selfie is of the same person that the passport belongs to.