When we shop for a camera, one of the first things a salesperson will tell us is how many megapixels the camera has. Most of us understand that this is a measure of the quality of the photos the camera will take. Some of us understand the relationship of megapixels to resolution. But for most of us, the actual nature of megapixels is a mystery. What are they? How do they work? How do they relate to megabytes? Why do they matter?
Now, stay with me here; we will be venturing into a little technospeak but it will be worth it. I apologise in advance to those of you who think some of this is basic or obvious, but what is obvious to you might not be obvious to someone else and I’d really like everyone who reads this article to come away thinking, “I really understand megapixels and megabytes now!”
A Bit about Bytes and Pixels
At heart, computers (and digital cameras) speak a very simple language. It is a language of ‘on’ or ‘off,’ ‘yes’ or ‘no,’ ‘one’ or ‘zero.’ All of our digital and online experiences are constructed from unimaginably huge numbers of these basic building blocks. Digital photos are no different. Each one of your photos is a collection of ones and zeros, or ‘bits,’ that are organised in sophisticated ways to form an image.
A bit is not a pixel. It is just a storage space for information about your pixel, which is a tiny square of colour. Every digital photo is made up of these tiny coloured squares. Together, like a tile mosaic, pixels (short for ‘picture elements’) form our photos.
Portrait of Camillo Rospigliosi
Glass tile mosaic by Giovanni Battista Calandra
The Getty Museum
Unlike a tile mosaic, which can be made with variegated tiles, each pixel can be only one colour. This is where bits come back in. If you were to take a 1 bit photo, your camera could only store two choices of colour, most likely either black or white. For each additional bit used, the possible number of colours is multiplied by two. For instance, a 2 bit photo allows the storage of a choice of four colours, a 3 bit photo allows the storage of a choice of 8 colours, and so on.
One of the most common types of image formats, the jpg, uses 8 bits for each of red, green and blue (the three colours computers mix to display a particular shade) and this means that every pixel requires 24 bits to store its colour. The advantage of using this much storage space for each pixel is that the camera can store the information for almost any colour you are likely to encounter through your viewfinder.
For convenience, we group bits into sets of eight. Each set of eight bits is called a byte. A megabyte is roughly a million bytes, or eight million bits.
Megapixels and Megabytes
Okay, now we know what a megabyte is. And we know what a pixel is. So what is a megapixel? And how does it relate to megabytes? And what does that mean when we’re talking about digital photos?
‘Megapixels’ is just a convenient way to talk about the total number of pixels a camera will be able to record for you when you take your photo. To count pixels, you simply multiply the number of pixels in height by the number of pixels in width. So an image that is 3264 x 2448 will be a total of 7,990,272 pixels. Rather than call this 7,990,272 pixels, we simply say it is 8 megapixels. As you can see, each million pixels is one megapixel.
So why are more megapixels better? The more pixels your camera can record (and remembering we use the shorthand megapixels to describe this number), the better the resolution of your photo. A digital photo has high resolution when you can see a lot of detail in the picture, even when you zoom in. Low resolution photos quickly ‘pixelate,’ that is they degrade into blocks of pixels when you zoom in. Why? Because of the amount of information that the camera records when it takes the photo. The higher the megapixels, the more information. So for example a camera that takes photos using 3 megapixels records only a quarter of the information that a 12 megapixel camera captures.
Holly under a tree, 2000
1024 x 768 pixels
Taken with Sony FD-91 ~1 megapixel camera
Let’s look at a real life example using photos from two different cameras. My first camera was a Sony FD-91. It took 1024 x 768 pixel photos. That meant that the photos were less than one megapixel of information. My second was a Sony DSC828. It took 3264 x 2448 pixel photos. That meant that the photos had 8 megapixels of information. I deliberately said ‘megapixels of information’ rather than ‘megapixels in size’ because regardless of how many megapixels of information your camera records, they can be displayed or printed out at almost any size.
Here are two photos, one from each camera. The subjects, cats, take up a similar amount of the image. Although the photos appear the same size in this post, they are of two very different megapixel sizes.
Bailey in his cat cave, 2005
3264 x 2448 pixels
Taken with Sony DSC828 8 megapixel camera
If you click on them to open the full image, you will see that the first photo appears in this post as almost 1/3 of its actual megapixel size. The second photo is being displayed at only 1/10 of its actual megapixel size. You should also notice a distinct difference in the amount of time required to display them. More megapixels means more megabytes, which means more time needed to download.
If we zoom in on the eyes of these cats (see zoomed images below), we can see that the first photo quickly pixelates, while the second photo has so much information that we can actually see the reflection of the room in Bailey’s left eye.
So, clearly more megapixels is better, and also more megapixels is bigger. But how exactly do megapixels relate to megabytes? This is a simple function of how many bytes are required by each pixel.
As mentioned before, the colour of each pixel is determined by the image sensor of the camera and the bit depth setting. If we assume you are taking photos using the common setting of 24 bits, you will need three bytes of eight bits each to store a single pixel. This means that a 12 megapixel photo will require 288 million bits (12 million pixels x 24 bits each) or 36 megabytes (288 million bits divided by 8 bits per byte, divided by a million bytes per megabyte). You might see an easier way to calculate this; all you need to do to identify how many megabytes each photo will be is to multiply the number of megapixels times three.
Now you might be saying to yourself, “my 8 megapixel camera takes photos much smaller than 24 megabytes each; that can’t be right.” A good question. The answer is that several image formats use sophisticated ways to decrease the amount of storage required for your photo. This is called compression. But that will have to be the subject of another post.
I hope you feel like you’ve taken a mega byte out of the mystery of megapixels.
If you are thinking what I hope you are, the aforementioned “I really understand megapixels now!” then please let me know with a comment or a ‘like.’ Perhaps you might even be interested in following my blog. My next post will explore bits in more depth.
I’m very interested to see who is out there paying attention!
All photographs by Sabrina Caldwell and are unaltered other than resizing for web use with the exception of the zoomed in and cropped images of cats’ eyes.