6

If I understand well then the EXIF data is written in an extra space of the JPEG file. When I add or modify an EXIF tag does this leave the picture untouched? I searched for this and I was not able to find an answer. I do not want to 'degrade' my pictures when I add/delete/update a tag at a later time.

1 Answer 1

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

1
  • Excellent examples!
    – texnic
    Mar 3 at 21:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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