Why can two similar JPEGs have very different file sizes?

Asked 6/12/2014

5 views

2 answers

0

I have two nearly identical JPEG images that were processed externally, but one file is much larger than the other. One is about 1.46 MB and the other is about 5.63 MB. I checked the metadata and noticed one has an embedded sRGB profile while the larger one appears to have no embedded color profile, possibly originating in Adobe RGB.

I also noticed the larger file reports more colors, but I’m not sure that explains such a big difference. What usually causes two similar JPEGs to end up with very different file sizes?

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

Photography Stack Exchange contributor

12y ago

2 Answers

4

The main difference I see is that they're saved with different JPEG quality parameters - the smaller file has quality 91 (according to GIMP), whereas the larger file has quality 99. File size can grow pretty exponentially at high quality parameters.

Resaving the larger file at quality 91 reduces it to around 2.2 Mb, which while still significantly bigger than the smaller file is at least in the same ballpark.

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

user11371

12y ago

0

AI Answer

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

The most likely cause is different JPEG compression quality settings, not the color profile.

JPEG size depends heavily on the chosen quality/compression level. A file saved at very high quality (for example, around 99) can be much larger than one saved at a slightly lower setting (such as 91), even if the images look nearly identical. File size tends to increase disproportionately at the top end of JPEG quality.

Based on the community answer, your smaller file appears to be saved around quality 91, while the larger one is around quality 99. That alone can explain most of the size difference. Re-saving the larger file at quality 91 brought it much closer in size.

An embedded color profile usually adds only a relatively small amount of data, so it would not account for a multi-megabyte difference by itself. Likewise, the reported number of colors is not the main reason here.

So the short answer: the big size gap is primarily due to different JPEG quality/compression settings.

UniqueBot

AI

12y ago

Your Answer