File size, image size, megapixels and resolution are common terms in digital photography. However, few of us really understand what they mean and how they relate to each other. Let’s break it down so we can make sense of this.
Pixels and Megapixels
We all understand what a pixel is. It’s the tiniest building block of a digital photo. Think of them as the tiles that make a mosaic. When you zoom in really close on a photo you can see the pixels. Each pixel we see in a photo is made up three different colored pixels; red, green and blue. When stacked on top of each other, each can make up one color in a range of over 16 million. A digital photo is a huge grid of many millions of pixels. What do we call a million pixels? A Megapixel. A camera with a 20 megapixel sensor records the scene in 20 million pixels.
Image size is a measure of photo size Adobe® Photoshop® and other pixel editors use. Image size looks at width and height in pixels, then multiplies by the number of channels (three for an RGB photo) to show the number of bytes the photo would take as a single-layer 8-bit photo saved as a TIFF. Still with me?
I’ll give you an example. A photo that is 3000 pixels by 2000 pixels, is 6 million pixels or (6 megapixels). Times that by the three channels for RGB. So 18 million bytes or 18 MB. Many years ago, the file saved out would be roughly 18 MB as a TIFF. However, today this is overly simplistic. A photo often contains multiple layers, masks, previews and thumbnails that can make the size of disk or file size much MUCH larger.
File size is a lot easier to understand, at least on the surface. It’s the amount of storage space on disk a photo uses. As I mentioned above, in the old days image size and file size meant roughly the same thing. Today, they are often very different. File size can be much smaller than image size if the photo is compressed, like in the case of a JPEG. JPEG compression can make a photo much smaller on disk. This is good for storage space and when you want to send the photo elsewhere (social media, friends, etc). Raw photos are also similarly smaller than their file size. Raw photos have a single color channel of data, so they are about a third the size on disk compared to their image size. Raw photos are generally about the same as the megapixel rating for the camera. For example, a 20 megapixel camera creates raw photos at about 20 MB in size.
There are other cases where the file size can be much larger than the image size. Remember, image size is calculated for a single 8 bit layer. However, when you create a 16-bit photo, it will double in size. For each layer you add, it doubles in size as well. The same goes for layer masks and transparency. Plus modern files also have embedded previews, thumbnails, color profiles and metadata which adds to their size as well.
Here’s an example to show how quickly the file size can increase. Let’s start with a 20 megapixel raw file. As I mentioned above, the file size will also be about 20 MB. As soon as you open this photo as a 16-bit PSD the file will blow up to 320 MB! That’s 20 MB for each channel (RGB, plus transparency), times two for being 16-bit, times two again for the file-sized, maximum compatibility, embedded preview. Some applications, like Photoshop, use compression and other optimizations to decrease layered file sizes in these cases. We will also be adding compression and other optimizations to saved PSD files here at ON1 for the future.
Last but not least is resolution. Probably the most misused term of the bunch. Some people talk about their camera having 20 megapixel resolution, which is an incorrect usage of the term. Resolution is a measure of density–how tightly packed the pixels are in a photo. Resolution is measured in pixels per inch (or pixels per cm). Some printer manufacturers also use the the term dots per inch, but that is a bit different and often confusing. Resolution really only comes into play when you are going to print your photos. The size of your prints is determined by the number of pixels on a side, divided by the resolution.
For example, a photo that is 3000 x 2000 pixels, at a resolution of 300 ppi would yield a print of 10” x 6.67”. The same 3000 x 2000 pixels on a television or normal computer display (72 or 96 ppi) would fill a display 31.25” x 20.83”. So when you zoom-in on a photo to 100%, you need to pan around to see all of it. Most digital cameras define their resolution at 72 ppi, which creates a huge “canvas” if you were to print it, but it wouldn’t be sharp at that size. So save yourselves the headache and use the Resize module or Print options in ON1 to properly rescale the resolution to what your printer needs.
Questions and comments are welcome. – Dan