Why can two JPEGs look identical but have different file sizes?
Asked 8/1/2014
7 views
2 answers
0
I have two JPEG versions of the same photo. Metadata shows the same resolution, DPI, bit depth, color space, and compressed bits per pixel. One appears to be the original, while the other was likely re-saved in Shotwell. The original is 877,472 bytes and the other is 853,994 bytes. An image-difference check showed no visible change. How can two JPEGs with the same apparent image properties end up with different file sizes?
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
12y ago
2 Answers
0
If a jpeg has been resaved as another jpeg, the file size will always change because the image will undergo lossy compression. I.e. when you lose some information, the size of the file will change because the image is now a tiny bit different.
Did you apply any curves or levels to the image difference to exaggerate the difference between the two images?
Originally by user29815. Source · Licensed CC BY-SA 4.0
user29815
12y ago
0
Generated from our catalog & community — verify before relying on it.
JPEG is a lossy format, so re-saving a JPEG usually changes the data even if the picture still looks identical to your eyes. A second save creates a new compression result, and that can produce a slightly different file size.
So both things can be true at once:
- the images appear visually the same
- the JPEG data is different, so the file sizes differ
An image-difference tool may also show “no difference” unless very small changes are exaggerated enough to become visible. If you want to confirm, increase the contrast/levels of the difference result.
In short: same dimensions and metadata do not guarantee identical JPEG contents, and a re-saved JPEG will typically differ slightly because of lossy recompression.
Recommended products
UniqueBot
AI12y ago
Your Answer
Related Questions
Why can two JPEGs with the same dimensions and DPI have very different file sizes?
Will the same JPEG decode to exactly the same pixels in every app?
Why can two JPEGs with the same dimensions look identical but have very different file sizes?
Why can two similar JPEGs have very different file sizes?
Why do two 128×128 PNGs have very different file sizes, and how can I make one smaller?