30. November 2014 · Write a comment · Categories: Uncategorized
I've noticed in Windows Photo Gallery (16.4.3528.331) when the user modifies any of the metadata (e.g. face tags, descriptive tags, geo tags, caption, rating, etc.) related to a JPEG image all the new or changed information is written directly into the file in Exif tags or another tag segment. This is expected and it is a very good thing.

However, in writing the new metadata to the file, WPG also recodes the image data from (presumably) the decoded raw pixels before writing it back to the file with the new metadata. This is not good because, as you know, JPEG is lossy algorithm and recoding the same image over and over again can affect the quality or produce visual artifacts in the image. Furthermore, this is not necessary because nothing with the actual image has been changed, only the associated metadata describing the image.

To be clear, I changed the metadata on the image file using WPG but did not do anything to actually modify the image itself (WPG did not automatically produce an 'original' copy like it would if you cropped it or made another modification). WPG resaved the entire file but instead of just copying the image data as it was from the original file it recoded the image. I know this for sure because I tested it by first making a copy of the file with all the metadata stripped off (all JPEG segments of FFE0 thru FFEF removed) then doing the same to the file after WPG updated the metadata. If only the metadata was modified then these two copies should be identical and they are not. They have different sizes and different MD5 digests. Other similar programs I have also been evaluating work as expected and just copy the original image data through without modifying it.

Is there some way to prevent this from happening? I only want the image to be recoded if I actually modify it for the reasons stated above.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.