Does editing EXIF metadata change JPEG image quality?
Asked 9/13/2015
4 views
2 answers
0
I understand EXIF metadata is stored separately within a JPEG file. If I add, delete, or modify EXIF tags later, does that leave the actual image data untouched, or can it reduce JPEG quality? I'm especially concerned about whether metadata edits cause the JPEG to be re-saved and recompressed.
Originally by Photography Stack Exchange contributor. Source · Licensed CC BY-SA 4.0
Photography Stack Exchange contributor
10y ago
2 Answers
7
There are tags that affect how the image can be interpreted by software (think about orientation), but no, the image bits should not be touched.
Now, lore says that there are (bad) editors that open the image (decode it) to show it, and even if you just change EXIF data, they re-encode the JPEG data instead of copying over the original. In that case, you can lose quality. I am quite sure that, for example, exiftool is safe (as will a lot of other tools be).
Proof: I start with the image blue_boniface.jpg, and I copy the same image to blue_boniface_bare.jpg and blue_boniface_comment.jpg:
% cp blue_boniface.jpg blue_boniface_bare.jpg
% cp blue_boniface.jpg blue_boniface_comment.jpg
Now I remove all EXIF from the first, and add a Comment field to the second:
% exiftool -all= blue_boniface_bare.jpg
% exiftool -Comment='This is a new comment' blue_boniface_comment.jpg
And after that I convert all the three images into PNM format (which has no ancillary data and is the barest picture format I know):
% jpegtopnm blue_boniface_bare.jpg > one.pnm
% jpegtopnm blue_boniface.jpg > two.pnm
% jpegtopnm blue_boniface_comment.jpg > three.pnm
% ls -l *.pnm
-rw-rw-r-- 1 romano romano 24307892 Sep 13 17:57 one.pnm
-rw-rw-r-- 1 romano romano 24307892 Sep 13 17:57 three.pnm
-rw-rw-r-- 1 romano romano 24307892 Sep 13 17:57 two.pnm
The three files seems the same, let's check:
% diff one.pnm two.pnm
% diff one.pnm three.pnm
(diff is silent if the files are the same). So the image data is exactly the same after the EXIF file manipulation. QED
Originally by user24174. Source · Licensed CC BY-SA 4.0
user24174
10y ago
0
Generated from our catalog & community — verify before relying on it.
Normally, changing EXIF metadata does not alter JPEG image quality. EXIF is stored as metadata segments in the JPEG file, separate from the compressed image data, so adding or editing tags should leave the image bits unchanged.
However, some poorly designed image editors may decode and re-encode the JPEG even when you only change metadata. If that happens, quality can degrade because JPEG is lossy. So the key issue is not EXIF itself, but whether the software rewrites the image data.
Also note that some tags can affect how software displays the image, such as the orientation tag, even though the underlying pixels are unchanged.
If you want to be safe, use a metadata-focused tool known to edit EXIF without recompressing the JPEG, such as exiftool.
Recommended products
UniqueBot
AI10y ago
Your Answer
Related Questions
Does editing a RAW file in Adobe Camera Raw change the original file?
Does opening and closing a JPEG reduce image quality, or only saving it?
How can I tell whether two JPEG files contain the same image data if their metadata differs?
How can I demonstrate JPEG quality loss from repeated saving or different compression settings?
What causes JPEG generational loss when a file is re-saved multiple times?