Image Size vs File Size vs Pixel Dimensions vs Saved Size

...or, When is File Size not File Size?

(please note, this is a re-run of an article that has previously appeared on my website in the days before blogging)

When discussing digital images there is much confusion about file size versus file size. Images have more than one file size, and I don't think anyone has come up with good terminology that distinguishes which size is being referenced at any time.

Some file sizes:
* The size of the file on your hard disk
* The size of the file open in your image editor
* The pixel dimensions of your image

Let's take the example of an image that you have versions of as a TIF and as a JPG.

I will use a Canon 1DmkII as the benchmark and talk about pixel dimensions. This is an 8 megapixel camera that outputs images that are 3504x2336 pixels. The file size for an UNCOMPRESSED RGB file at these pixel dimensions is 23.4 megabytes. If you were to save this file as a 8-bit RGB uncompressed TIF file it would be about 23.5 megabytes on your hard disk. There might be a few extra bytes used for a saved preview, an included color profile, etc. But the file size will be pretty close to the size it takes up when open in your image editor.

If you saved that same file as an LZW compressed 8-bit RGB TIF file it would be a smaller file size as a saved file (the exact size will depend on the content of the image and how well it compresses). But when you open the file in your image editor you would see that it has expanded back.

Right now I have open in Adobe Photoshop an image from the Canon 1DmkII. I have saved this same image in a number of different formats. In Photoshop I can see that the image is 23.4 Megabytes. I can see this by going to Image > Image Size and reading the first line in the dialog box. The file size listed after Pixel Dimensions: is the important number here.


NOTE!! In the Image Size dialog box above the Resolution is set to 300 pixels/inch. Your files may or may not come into Photoshop with this same number. If you are working with raw files you have the option to set the resolution you want in your raw converter. If you are working with JPG files this might show as 72 pixels/inch, or 180 pixels/inch, or 240 pixels/inch. You can change this number to whatever you want or need it to be. But if you do change this, make this the first thing you change. Then set your Pixel Dimensions after changing the Resolution. If you change the Resolution after changing the Pixel Dimensions the Pixel Dimensions will change to reflect your new Resolution and it can get very confusing. The alternate is to first open the Image Size box, UNCHECK THE RESAMPE IMAGE BOX, change the Resolution and click OK. Then open the Image Size box again, CHECK THE RESAMPLE IMAGE BOX, set your Pixel Dimensions, and click OK again.

I can also look at the various saved versions in Adobe Bridge. Here is what I see there:

tiff_version 3504x2336 pixels, 23.45 MB
tiff_version_lzw 3504x2336, 10.27 MB
jpg_version_10 3504x2336, 1.79 MB
jpg_version_11 3504x2336, 2.63 MB
jpg_version_12 3504x2336, 4.16MB

Note that all files are of the same image and are the same pixel dimensions. And all of them, when open in Photoshop, are the same 23.45 megabytes in size. The File Size for each of these is 23.4 megabytes. Yet the "saved on disk" file sizes are radically different.

Now, suppose you want to submit this image to a stock agency that requires a 48MB file. What do you need to do?

The first thing you need to do is to recognize that they are asking for an uncompressed 48MB size. This is the size of the file open in your image editor. It is not the size of the file on your hard disk (though it could be if you were submitting a TIF file). Your JPG version is going to be radically smaller on your hard disk than it is going to be in memory.

Let's take the same image referenced above and resize it to 48MB and then see what happens to the file size on disk and the file size in memory. I will use Photoshop in my example. Other image editors should have a way to display the following information.

* Open your original file
* Save a work copy as a TIFF file with no compression
* Open the Image Size dialog box (Image > Image Size)
* Make sure the "Resample Image" box is checked and that is says Bicubic
* Go to the top input field (Width) and change that to 5100 pixels
You will see that the height will automatically adjust to 3400 pixels
You will also see that the file size (above the box you just type in) has changed the size to 49.6M (was 23.45M).
You now have a 49.6Megabyte file (meeting the 48M minimum requirement)

Check the disk file size for your image. The file, work.tif, shows saved on the hard disk at 50,384 KB (around 50 megabytes)

Check the disk file size for your image. The file, work.tif, shows saved on the hard disk at 50,384 KB (around 50 megabytes)


also saved the file as a Level 10 JPG and you can see that it is a much smaller file on the hard disk:

work_jpg_10.jpg shows saved on the hard disk at 3,280KB (around 3 megabytes)

NOTE: the actual size for your image will vary with the contents of the image and how well it compresses

Open the JPG file in Photoshop again and look at the Image Size:


The image is still 5100x3400 pixels and 49.6 megabytes uncompressed. But your JPG file size is only around 3.2 megabytes. The 3.2 megabyte image should be sent to your stock agency.

ADDENDUM: This article was written before Adobe Photoshop Lightroom became available. When working in Lightroom you select the file size of an image when you export it out of Lightroom. Go to File > Export, select where to export to (in this case I will select Hard Drive). The fourth section of the Export dialog box is Image Sizing. There you can tell Lightroom how to size your image. You can select width and height in pixels and resolution. Similar to Photoshop, if you want a file larger than 48 megabytes you need to set the pixel options to 5100. Resolution doesn't really matter here, but set it to 300 dpi so everyone is happy.