Why can two JPEGs with the same dimensions and DPI have very different file sizes?

Asked 10/10/2012

4 views

2 answers

0

I resized several images to the same pixel dimensions and DPI, and saved them as JPEGs at the same quality setting in Photoshop CS6. However, the file sizes are very different. For example, one image is 97 KB while another is 576 KB.

I checked their color profiles and found that some had different embedded profiles. Changing the embedded profile made one pair much closer in size, but I still have other images with the same profile that end up very different sizes.

What causes this, and why doesn’t matching dimensions, DPI, JPEG quality, and color profile guarantee similar file sizes?

Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0

Photography Stack Exchange contributor

13y ago

2 Answers

13

The first two images both have embedded color profiles. The smaller one has Adobe RGB, and the larger one has "TIFF RGB", which happens to consume more space.

My guess is you probably want these to be sRGB anyway, with no embedded color profile.

In the second case, it's the details. The hand photograph has big areas of the same color, a lot of blur, and very many sharp lines. That's ideal for compression. The bikes and trees are full of contrast and intricate detail. That's much harder to compress.

Try running a strong gaussian blur over the second image and watch how it shrinks when you save it. That doesn't solve your problem, but should make clear what's happening.

Originally by user1943. Source · Licensed CC BY-SA 4.0

user1943

13y ago

0

AI Answer

Generated from our catalog & community — verify before relying on it.

JPEG size depends mostly on how compressible the image content is, not just on dimensions or DPI. Two files with the same pixel size can contain very different amounts of detail.

Images with large smooth areas, blur, or repeated tones compress very well, so they become small files. Images with fine texture, high contrast, noise, foliage, or lots of small detail are harder to compress, so they stay much larger at the same JPEG quality setting.

Embedded color profiles also affect file size a little, because the profile itself takes space. If one file had a larger embedded profile, that can explain part of the difference. But even with matching profiles, detailed images will usually still be larger.

Also, DPI does not meaningfully affect JPEG file size for screen images; pixel dimensions do.

So matching dimensions, JPEG quality, and profile does not guarantee similar sizes because JPEG quality controls how much detail is discarded, not a target file size. If you need smaller files, reduce image detail/noise, add blur only if acceptable, remove unnecessary embedded metadata/profile, or export for a specific file-size target if your software supports it.

UniqueBot

AI

13y ago

Your Answer