Undeveloped film records a photo by chemically reacting to light. Even after it has been exposed properly in the camera, it remains sensitive to additional light until it has been "fixed" at the end of the development process.
Used properly in a camera the amount of light allowed to shine on the film is comparatively small. Film needs to be very sensitive to light in order to allow taking photos using short exposure times that typically range from 1/60-1/1000 seconds or even shorter while only allowing light to shine on it through a small hole (the entrance pupil of the lens).
When the back of a camera is opened in an environment with pretty much any light present the amount of light striking the film is MUCH greater than what is typically allowed through a lens. With no lens and light box controlling how much light is allowed to shine on the film, effectively you're at near zero focal length lens with a near infinitely large aperture. The light is also allowed to shine on the film for MUCH longer that is the case for a typical shutter duration that is only fractions of a second long.
Any parts of the film that are exposed to direct light when the back of the camera is opened will be completely fogged. That is, when developed the negative will turn completely opaque and not allow any light to pass through.
Parts of the film that are inside the film cannister should be protected as long as the felt around the opening that the film passes through is not damaged.
Parts of the film that are wound on the camera's takeup spool are what might or might not be safe. It all depends upon several factors:
- Does the takeup spool have discs on the ends of the shaft to prevent light from leaking into film from above and below it?
- Is the takeup spool recessed into the main body of the camera in such a way that when the back is open it's still in shadow?
- How tightly is the film wound onto the takeup spool? Is it allowed to uncoil when the camera back is opened? The tighter the film is wound, the less light will be allowed to reach the part of the film in the middle closest to the spindle of the takeup spool.
- How bright was the light in the environment when the back of the camera was opened? "Dim" lighting could be anything from a room illuminated with a 100W bulb, which will probably completely ruin all of the film outside the film cannister, to a room with a single candle burning on the other end of it, which would take several seconds to do any serious fogging of the film wound up on the takeup spool. That's a huge range.
- For how long was the camera back open? One-half second? Four or five seconds? Ten or twenty seconds? That's a pretty wide range as well.
The main thing to learn from this experience is to never open the back of your camera unless you are SURE the film has been wound back into the film cannister.
If there's any doubt at all, then only open the back in a completely dark room, such as an interior room with no windows and a rolled up towel blocking any light from shining in under the bottom of the door and feel with your fingers to see if the film has been rewound or not. Or you can use what is known as a changing bag that was used back in the days before roll film came protected inside light proof cassettes. Larger and medium format film cameras still use film that is best loaded in complete darkness. Changing bags are made of solid, opaque material and have arm holes with elastic that hold the material tightly against the user's arms.