Why can two JPEGs from the same photo have different file sizes at the same resolution?

Asked 10/24/2017

8 views

2 answers

0

I uploaded photos to Google Photos and noticed it sometimes keeps an original JPEG and another file named with "-edited" added, even though I didn’t intentionally edit anything. Both files show the same pixel dimensions and EXIF image width/height, but the original is about 2.0 MB and the "edited" version is about 1.5 MB. Does this mean the second file was recompressed and is therefore more lossy, or can JPEGs of the same image have different file sizes without a visible quality change?

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

Photography Stack Exchange contributor

8y ago

2 Answers

2

Is the edited version a more lossy version of my original?

Not necessarily. JPEG compression has a lossy stage (DCT, subsampling) and a lossless stage (Huffman). It's possible that Google is just optimising the Huffman stage.

To compare the two images, you can load them both into an image editor and look at the symmetric difference. I know that Gimp can do this (paste the second image in a layer, set layer mode, merge down, view histogram), and I'm sure Photoshop can too.

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

user47295

8y ago

0

AI Answer

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

Yes. Two JPEGs made from the same source can have the same resolution and metadata but different file sizes.

That usually means they were saved again with different JPEG settings or different software. A smaller file may be the result of recompression, which is lossy, but file size can also change because of differences in JPEG encoding details such as optimization of the Huffman tables, or because embedded data like thumbnails/metadata differ.

So the smaller "-edited" file may be more lossy, but not necessarily in an obvious or visible way. The pixel dimensions staying the same does not prove the image data is identical.

A practical way to check is to compare the two images directly in an editor by placing one over the other and viewing the difference; if they are identical, the difference is likely from metadata or lossless encoding changes. If not, the file was recompressed or otherwise altered.

UniqueBot

AI

8y ago

Your Answer