File Size Variations

Facebooktwitterlinkedin

Today’s Question: Can you help clear up my confusion about file sizes? When I download a JPEG image from my iPhone, Lightroom shows it as having a file size of around 7.24MB. (The sizes vary from image to image, from about 2.0MB to 7.5MB.) If I send that JPEG to Photoshop I get a PSD image showing a file size of 69.8MB. This size of 69.8MB seems to be constant, no matter what the size of the original iPhone JPEG file is. If I then export the PSD image as a JPEG file I get a JPEG with a file size ranging from about 6MB to about 13.5MB. What’s happening here? Is there a benefit to getting the larger JPEG files by first producing a PSD?

Tim’s Quick Answer: In this case the primary source of confusion relates to differences in compression being applied to the JPEG images. Compression at different quality levels along with variations in the pixel data in the source image can lead to considerable differences from one JPEG file to the next.

More Detail: There are three key factors that affect file size in this context. The first is the total number of pixels contained in the image, meaning the pixel dimensions or number of megapixels. The second is the bit-depth of the image, with JPEG images only supporting 8-bit per channel mode. The third factor is compression, which is a significant variable for JPEG image file size.

With JPEG compression there is a Quality setting, which effectively controls how strong the compression should be applied. Stronger compression yields smaller file sizes, but also lower image quality. That’s not to say the image at a lower Quality setting will always have an obviously degraded image quality, but there is a difference at the pixel level. In addition, the contents of the image affect compression effectiveness. A very simple image will compress to a smaller file size than a complicated image, all other things being equal.

In this particular example one JPEG is being created by the camera (an iPhone), and the other JPEG is being created based on a derivative PSD image. While the latter JPEG may have a larger file size, there has also been an addition application of compression applied, which will have at least a small adverse effect on the quality of the image. So I would still start from the source JPEG capture, even though the file size is smaller.

Note, by the way, that the PSD file has its own set of factors affecting the file size. For example, the PSD created through Lightroom can have a bit depth of either 8-bits per channel or 16-bit per channel, with the latter causing the base file size to be twice as big. In addition a PSD file can contain layers, saved selections, layer masks, and other elements that can increase total file size. As for compression, Photoshop will use lossless compression with PSD files, which can help produce a file smaller than an uncompressed TIFF image, but still considerably larger than a JPEG image.

File size variations can be confusing, to be sure. Just keep in mind that in general it is best to start with your original source capture when optimizing a photo. When creating a derivative image it is generally best to use a file with no compression (or lossless compression) such as a PSD or TIFF image if quality is of primary concern. For other forms of sharing, a JPEG image will often provide a good solution.