File Size Confusion


Today’s Question: Due to an accident in the field I shot a lot of images in only JPEG instead of RAW plus JPEG. In order to avoid lossy compression after numerous image edits I saved the JPEGs as TIFFs. The resulting file size increase was hard to explain: 19 MB for the JPEG to 147 MB for the TIFF. What happened here?

Tim’s Quick Answer: These file sizes are actually no surprise at all to me. Images saved as a JPEG will generally have a file size that is significantly smaller than a TIFF, even if the JPEG file is saved at a high quality setting and the TIFF image is saved with lossless compression.

More Detail: Put simply, JPEG compression is relatively aggressive. The results will vary based on the complexity of the image. An image with tremendous texture and detail will result in a larger JPEG image than a relatively simple image with minimal variations in tone and color. But the file size will still be significantly smaller than a TIFF image.

Let’s assume a relatively low resolution image, saved as a TIFF file with no compression applied, with a file size of 8 MB. If that same image is saved with the LZW compression option (which is a lossless compression algorithm), that same TIFF image would be around 5 MB or so in size. Saved as a JPEG at a high quality setting, that same image would be a fraction of a megabyte (probably around 300 KB).

Note that if layers are included in the TIFF image, the file size can grow significantly larger. For example, creating a copy of the Background image layer in Photoshop will cause the TIFF image to double in size.

What is most surprising about JPEG compression is how well image quality can be maintained when you use a high quality setting for the JPEG. While the compression for a JPEG image is always lossy, at a high quality setting the amount of degradation to the image is minimal.

In most cases the most significant negative affect of JPEG compression is a grid pattern that can appear. This is caused by the approach used for JPEG compression, where the image is divided into a grid (typically into blocks of 16 by 16 pixels) and the information within each block of the grid is simplified to reduce file size. The result is that pixels on either side of a grid line may not match up as well as they did before JPEG compression was applied, causing a faint (but sometimes obvious) grid pattern in the image. This is the primary reason I recommend avoiding JPEG capture whenever possible.

While file sizes for a TIFF image can be significantly larger than for the same image saved as a JPEG image, if you will be applying strong adjustments to the image and re-saving the image multiple times after applying changes, it is a good idea to save the JPEG capture as a TIFF image. I do recommend using LZW compression for the TIFF image to help keep the file size smaller, but the an image saved as a TIFF will always be quite a bit larger than the same image saved as a JPEG.