1

I have two versions of a JPG photo. According to the metadata, one has been saved in Shotwell while the other one is probably the orginal. Both files have the same resolution, dpi, bit depth, color space and compressed bits per pixel.

The presumed original is 877.472 bytes, the other version is 853.994 bytes. An image diff showed no difference. How can this be?

  • Maybe the original have EXIF data? – Håkon K. Olafsen Aug 1 '14 at 22:33
  • The only difference in the EXIF data is that in the category main IFD, the field Software contains "Shotwell 0.9.3" in one case and "1.400" in the other case. But (877472-853994 bytes) divided by 4 (bytes per UTF-8 char) results in at minimum 5869.5 chars difference. So that doesn't seem to be the main reason. – 804b18f832fb419fb142 Aug 1 '14 at 22:46
  • Embedded thumbnail? – mattdm Aug 1 '14 at 23:35
  • 2
    Could be all sorts of stuff: metadata, padding or data that doesn't affect the display of the JPG itself. Also, even with lossless compression, different algorithms would produce different file sizes, but being lossless an image diff should show nothing. – MikeW Aug 2 '14 at 0:24
  • "4 (bytes per UTF-8 char)" UTF-8 is a variable-width encoding that requires between 1 and 4 bytes (strictly speaking, 8-bit sequences) to correctly encode a given Unicode code point. It can be generalized to encode any 31-bit sequence into up to 6 bytes. en.wikipedia.org/wiki/UTF-8#Description – a CVn Aug 2 '14 at 16:03
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?

  • First I used download.cnet.com/ImageDiff/3000-2192_4-10401778.html which showed that there was no difference, same with using the difference mode for layers in Gimp and applying curves and levels. – 804b18f832fb419fb142 Aug 2 '14 at 1:58
  • Interesting- I'd have thought that you'd have seen something. – JenSCDC Aug 2 '14 at 2:03
  • 1
    Resaved JPEG compression will eventually converge at the same image every time (with the same settings). Probably around ten times, but fewer is conceivable. See photo.stackexchange.com/a/34192/1943 – mattdm Aug 2 '14 at 3:44
  • That's interesting- I wonder if the standard was designed so that the saved images would converge or if it was an accident of mathematics. – JenSCDC Aug 2 '14 at 4:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.