How Does a Pinhole Camera Work?
When light passes through the pinhole it creates an image on the opposite side of the box. This image is upside down and a mirror image because the light rays from the bottom pass through the pinhole and become the top part of the image. The same thing happens with the top of the object but the light rays form the bottom of the image inside the box or chamber.
For more information, watch this video by Dr. Kiki - popSiren