by Chris Woodford. Last updated: July 16, 2015.
Digital cameras give a whole new meaning to the idea of painting by numbers. Unlike old-style film cameras, they capture and record images of the world around us using digital technology. In other words, they store photographs not as patterns of darkness and light but as long strings of numbers. This has many advantages: it gives us instant photographs, allows us to edit our pictures, and makes it easier for us to share photographs using cell phones (mobile phones), e-mail, and web sites.
Photo: A typical low-cost digital camera. The circle is the lens; the rectangle above it is a xenon flash lamp. You can see what this camera looks like inside in the photo lower down this page.
How ordinary film cameras work
Photo: An old-style film camera from the late 1980s. The film loads in a spool on the right and winds across to another spool on the left, passing in front of the lens on the way. When you take a photo, the shutter lets light enter from the lens and expose the film. It's all very 19th-century compared to digital photography!
If you have an old-style camera, you'll know that it's useless without one vital piece of equipment: a film. A film is a long spool of flexible plastic coated with special chemicals (based on compounds of silver) that are sensitive to light. To stop light spoiling the film, it is wrapped up inside a tough, light-proof plastic cylinder—the thing you put in your camera.
When you want to take a photograph with a film camera, you have to press a button. This operates a mechanism called the shutter, which makes a hole (the aperture) open briefly at the front of the camera, allowing light to enter through the lens (a thick piece of glass or plastic mounted on the front). The light causes reactions to take place in the chemicals on the film, thus storing the picture in front of you.
This isn't quite the end of the process, however. When the film is full, you have to take it to a drugstore (chemist's) to have it developed. Usually, this involves placing the film into a huge automated developing machine. The machine opens up the film container, pulls out the film, and dips it in various other chemicals to make your photos appear. This process turns the film into a series of "negative" pictures—ghostly reverse versions of what you actually saw. In a negative, the black areas look light and vice-versa and all the colors look weird too because the negative stores them as their opposites. Once the machine has made the negatives, it uses them to make prints (finished versions) of your photos.
If you want to take only one or two photographs, all of this can be a bit of a nuisance. Most people have found themselves wasting photographs simply to "finish off the film." Often, you have to wait several days for your film to be developed and your prints (the finished photographs) returned to you. It's no wonder that digital photography has become very popular—because it solves all these problems at a stroke.
(Incidentally, if you want to learn more about film cameras and traditional photography, see our main article on how film cameras work.)
How digital cameras work
Digital cameras look very much like ordinary film cameras but they work in a completely different way. When you press the button to take a photograph with a digital camera, an aperture opens at the front of the camera and light streams in through the lens. So far, it's just the same as a film camera. From this point on, however, everything is different. There is no film in a digital camera. Instead, there is a piece of electronic equipment that captures the incoming light rays and turns them into electrical signals. This light detector is called a charge-coupled device (CCD).
Photo: A typical CCD chip. The green rectangle in the center (about the size of a fingernail) is the light-sensitive part; the gold wires coming off it connect it into the camera circuit.
If you've ever looked at a television screen close up, you will have noticed that the picture is made up of millions of tiny colored dots or squares called pixels. Laptop LCD computer screens also make up their images using pixels, although they are often much too small to see. In a television or computer screen, electronic equipment switches all these colored pixels on and off very quickly. Light from the screen travels out to your eyes and your brain is fooled into see a large, moving picture.
In a digital camera, exactly the opposite happens. Light from the thing you are photographing zooms into the camera lens. This incoming "picture" hits the CCD, which breaks it up into millions of pixels. The CCD measures the color and brightness of each pixel and stores it as a number. Your digital photograph is effectively an enormously long string of numbers describing the exact details of each pixel it contains. You can read more about how a CCD produces a digital photograph in our article on webcams.
How digital cameras use digital technology
Once a picture is stored in numeric form, you can do all kinds of things with it. Plug your digital camera into your computer, and you can download the images you've taken and load them into programs like PhotoShop to edit them or jazz them up. Or you can upload them onto websites, email them to friends, and so on. This is possible because your photographs are stored in digital format and all kinds of other digital gadgets—everything from MP3-playing iPods to cellphones and computers to photo printers—use digital technology too. Digital is a kind of language that all electronic gadgets "speak" today.
If you open up a digital photograph in a paint (image editing) program, you can change it in all kinds of ways. A program like this works by adjusting the numbers that represent each pixel of the image. So, if you click on a control that makes the image 20 percent brighter, the program goes through all the numbers for each pixel in turn and increases them by 20 percent. If you mirror an image (flip it horizontally), the program reverses the sequence of the numbers it stores so they run in the opposite direction. What you see on the screen is the image changing as you edit or manipulate it. But what you don't see is the paint program changing all the numbers in the background.
Some of these image-editing techniques are built into more sophisticated digital cameras. You might have a camera that has an optical zoom and a digital zoom. An optical zoom means that the lens moves in and out to make the incoming image bigger or smaller when it hits the CCD. A digital zoom means that the microchip inside the camera blows up the incoming image without actually moving the lens. So, just like moving closer to a TV set, the image degrades in quality. In short, optical zooms make images bigger and just as clear, but digital zooms make images bigger and more blurred.
Photo: Digital cameras are much more convenient than film cameras. You can instantly see how the picture will look from the LCD screen on the back. If your picture doesn't turn out okay, you can simply delete it and try again. You can't do that with a film camera. Digital cameras mean photographers can be more creative and experimental.
Why digital cameras compress images
Image for a moment that you're a CCD. Look out of a window and try to figure out how you would store details of the view you can see. First, you'd have to divide the image into a grid of squares. So you'd need to draw an imaginary grid on top of the window. Next, you'd have to measure the color and brightness of each pixel in the grid. Finally, you'd have to write all these measurements down as numbers. If you measured the color and brightness for six million pixels and wrote both down both things as numbers, you'd end up with a string of millions of numbers—just to store one photograph! This is why high-quality digital images often make enormous files on your computer. Each one can be several megabytes (millions of characters) in size.
around this, digital cameras, computers, and other digital gadgets
use a technique called compression. Compression is a mathematical trick
that involves squeezing digital photos
so they can be stored with fewer numbers and less memory.
One popular form of compression is called JPG (pronounced J-PEG, which
stands for Joint
Photographic Experts Group, after the scientists and mathematicians
who thought up the idea). JPG is known as a "lossy"
compression because, when photographs are squeezed this way, some
information is lost and can never be restored. High-resolution JPGs
use lots of memory space and look very clear; low resolution JPGs use
much less space and look more blurred. You can find out more about
compression in our article on MP3
Most digital cameras have settings that let you take pictures at higher or lower resolutions. If you select high-resolution, the camera can store fewer images on its memory card—but they are much better quality. Opt for low-resolution and you will get more images, but the quality won't be as good. Low-resolution images are stored with greater compression.
Turning ordinary photos into digital photos
There is a way to turn photos from an ordinary film camera into digital photos—by scanning them. A scanner is a piece of computer equipment that looks like a small photocopier but works like a digital camera. When you put your photos in a scanner, a light scans across them, turning them into strings of pixels and thus into digital images you can see on your computer.