Adding metadata alters (reduces) image file size.

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Adding metadata alters (reduces) image file size.

jcnetmp+jzziy@gmail.com
Good day, everyone!

I'm new to digiKam, and have been on the hunt for a non-destructive image organization tool.  This really seems to fit the bill quite nicely--what a great tool, thanks to all who have worked on it! :D

I had previously been looking at just utilizing File Explorer (Windows) to add tags to images, but I noticed that when I added tags to images, it would often reduce the filesize, also, sometimes quite a bit.  
Example:  12,365,692 bytes drops a meg to 11,247,905 bytes just after adding a single "test" tag!
I was not able to find any definitive data as to what exactly Windows is doing, here.  So I tried an experiment.

In digiKam, I would normally by looking at -not- saving data to the file (leaving those options unchecked).  But for a test, I enabled the saving of 'rating' to the file, and set a rating.  Sure enough, the filesize dropped by quite a bit, here, too.

Since this is contained to digiKam, I thought someone might be able to shed some light on what actual image manipulation is going on, here.  It is clearly doing something beyond just a few bytes of tag or rating data...

Thanks!
Reply | Threaded
Open this post in threaded view
|

Re: Adding metadata alters (reduces) image file size.

jcnetmp+jzziy@gmail.com
This is the best theory I've found: https://photo.stackexchange.com/questions/101267/editing-jpeg-with-windows-photo-viewer-gives-strange-results

Seems maybe some metadata, potentially thumbnails, are being blown away.  Not surprised that Windows does this on its own, but a little more surprised that digiKam alters the file this way when all it should be doing is storing the metadata and not touching anything else.
Reply | Threaded
Open this post in threaded view
|

Re: Adding metadata alters (reduces) image file size.

AlexC
In reply to this post by jcnetmp+jzziy@gmail.com
Hi,
I have noticed the same after retagging my photos, and as I was worried there could be jpeg reencoding and therefore quality loss every time a tag is applied, I compared before and after photos: all pixels are the same as mentioned on the link of the previous post.
It might indeed be something like the thumbnails only are reencoded
Or maybe the xmp coding is more efficient (less characters for the same information)
I don't think jpegs would be reencoded in progressive, because it would show in pixel per pixel comparison no?
In my case the loss of size was less though, more like a few kB if I recall correctly
Reply | Threaded
Open this post in threaded view
|

Re: Adding metadata alters (reduces) image file size.

jcnetmp+jzziy@gmail.com
Any filesize reduction means information has been lost.
Having no visibility into what data is disappearing is a scary proposition. :|