First, let’s understand that megapixels refers to how many photo sites are in your camera sensor recording data to create an image. The number of photo sites equals the number of pixels (“dots”) in your image. The more dots, the smaller the dots are at any given print size, and therefore the greater the detail and resolution in your image.
So, many folks assume that if they have a 22.3 MP camera, they will get 22.3 MB files. There are many reasons why this likely won’t be true.
First, a mega pixel does NOT necessarily equate to a megabyte of data. How much data is recorded by a pixel (or, more correctly, a photo site on your sensor) varies. Brighter areas in an image record more data than darker areas. Also, badly over exposed or under exposed images record less data—the white goes to pure white and the black goes to pure black with no details. The same number of megapixels will produce different numbers of megabytes in different circumstances. Ultimately, the file size in MB is the total amount of data recorded by all pixels plus any “overhead” data added by the proprietary format.
Second, your camera has choices on how you want to record your image files. Some cameras have options to save different sizes of RAW format files and/or different sizes of JPEG format files (some even have TIFF choices). Here is an example of the different settings and the resulting file sizes from the Canon 5D Mark III manual:
The different settings affect how many megapixels are turned on to record data as well as what file format the data is saved in, creating different file sizes.
So, what the heck does all this mean? RAW is a proprietary format that is unique for each camera vendor. It’s essentially your photo negative. It cannot be directly altered—if you edit a RAW file in software, you actually create a new file to save the changes. To share a photo, you have to convert to a standard file format such as JPEG eventually.
So, why not save all your images to JPEG in the camera to begin with? Well, there are good reasons to save JPEGs. For example, let’s say your shooting in completely predictable conditions (like a studio), you have all your settings dialed in and you know nothing is going to change on you. Shooting in JPEG can save a lot of space and allow your camera to shoot faster without having to stop and catch up periodically.
However, if you don’t feel confident that you know how to “dial-in” all of your settings (including the post-processing settings in your camera that determine things like brightness, contrast, saturation as well as the white balance setting), you might not want to risk losing data for the sake of saving space.
JPEG files are compressed. However, some of the data is thrown away when the file is compressed. So, the file size you get is significantly smaller than the RAW file, but some of that is because the data has been squished together (but is still there) and some of it is because data has been thrown away, never to be seen again.
Notice that the largest JPEG file in this example is 7 MB for a 22 MP image. This does NOT mean that 15 MP were thrown away. All 22 MP were used to record data, but that data got compressed into 7 MB. By comparison, the full RAW format would produce a 27.1 MB file. This difference does not indicate how much data was actually lost.
While JPEG is “lossy,” it also reduces file sizes by compressing data in ways that don’t necessarily result in a loss of quality. For example, instead of recording 1000 pixels individually are a particular shade of red, the JPEG file might just record that these 1000 pixels are red collectively. In that sense, the data isn’t “lost,” it’s just consolidated. However, some data is lost and repeatedly editing a JPEG causes the losses to be more significant. Also, the quality settings you choose when saving a JPEG have a significant impact.
Two areas of data loss that frequently limit what you can do with a JPEG image are data that falls outside the dynamic range of the JPEG file (pure black and pure white areas with no details) and in color casts. If you have an over-exposed sky in a JPEG file and you try to reduce the exposure in software, the sky turns gray. If you have a RAW file, it might bring back the blue—it depends on how badly over exposed it is.
White balance doesn’t fix well in a JPEG file either. If you don’t have your white balance just right, it can come out quite odd looking if you’re editing a JPEG. It can also be impossible to get the white back to white. Color-casts can ruin otherwise good images and are commonly seen in the images produced by beginning photographers.
As a general rule, if you want to do post-processing on your computer and you’re not overly concerned with hard drive space or memory, save the largest RAW files to get the maximum amount of data and the highest resolution images.
If you are confident you know how to control all the settings in the your camera properly so that you can produce final images with only the settings your camera provides and that the situation isn’t going to change suddenly (e.g., the sun coming out from behind the clouds can totally change your white balance), then you can save time and space by saving JPEGs.
Or, a simpler way to decide: are you a control freak? Save to the largest RAW format. Are you an efficiency freak? Save to the largest JPEG format. Do you not care at all how your images look? Save to the smallest JPEG format.
Frankly, I don’t know what to do with all those other choices. If you have to hand photos in JPEG format to people immediately while at a shoot, saving both RAW and JPEG makes sense to me. I haven’t come up with a use case that works for me for using smaller file sizes, however. And I sure don’t want to turn off a portion of the pixels I paid so much to have!
That said, camera makers don’t make up features just for the sake of adding features, so I’m sure there are use cases that make perfect sense for those settings as well.
2 thoughts on “Why does a 22.3 MP camera produce a 7 MB file size?”
Really helpful in understanding the relationships I could not previously fathom. Thank you
this is exactly the anwer I was looking for, thanks!