The first camera, the pinhole camera or camera obscura, was invented by Alhazen, a prominent figure in the field of optics in the Middle Ages. Alhazen lived around the year 1000, but the exact year when he developed the pinhole camera is uncertain.
The first photograph made from a pinhole camera was accomplished in 1827, by Jospeh Nicephore Niepce. People only used the pinhole camera for viewing or drawing functions prior to the first photographic image. However, Niepce's photographs required eight hours of light exposure to appear, and would then soon fade. The development of the box camera was made possible due to George Eastman's invention of film that could be rolled in 1889.