Why the metadata editor in darktable doesn’t actually change the metadata in the raw file?
If you are changing metadata, you’d want to change it everywhere but primarily in the raw file.
As an example; you might have done a photo shoot with a borrowed or rented camera and didn’t bother to change the Copyright and Artist settings in the camera and now you want to inject your own Copyright and Artist metadata in the raw files in post.
Why doesn’t the metadata editor work this way?
edit: SOLUTION:
I was 100% wrong thinking this was a robust enough thing. And I’m done doing that. I’d still do it if I wanna share a raw file but I’ll never replace the original file with a modded one and eve if I wanna share a raw file with someone maybe it would be the best to convert it to DNG and then I guess I can change whatever I like.
I’ll just have to always keep in mind to change that metadata settings in the camera before the shoot.
It might be nice to be able to inject metadata into the raw file from darktable on request but I’m not sure it should work that way by default, since you could have multiple edits and want different metadata on each of them. I mean, perhaps not copyright and artist, but maybe description, title, or tags might want to be different
RAW files are proprietary to the camera manufacturers, and the open source parsers only understand certain parts of the files (particularly the XMP, IPTC and media containers). However, there are often other parts of the file that are not understood, or may even be encrypted, and they may contain references that would be broken if the file was changed. For this reason, it is better to keep the raw files read-only, and save any updates into a separate sidecar file.
But if you share your raw file it’s not copyrighted to you. It’s an essential feature in my opinion. I haven’t found any file misbehaving after changing the Copyright and Artist metadata.
Developers make mistakes and at a certain point something will go wrong. Why would you want to take that chance? The current solution of putting the data in a sidecar is practical and safe.
The moment that darktable, or any other RAW editor I am using, starts touching my RAWs I will immediately stop using it. Do not touch my RAWs, those are irreplaceable.
Changing raw metadata leaves original files intact so you can revert to them if something goes wrong.
But it doesn’t apply to the raw file. It’s for JPEG during export.
You can always just inject the old metadata an that would solve the issue. Or I guess even open the binary and copy paste the needed part. So I’d say it’s pretty safe.
It is not that simple. For example Copyright and Artist have variable length so you cannot just copy/pase over them even in binary form, you have to offset all the data after them. As @Matt_Maguire points out, you’re dealing with proprietary formats, so there is never a 100% guarantee you have accounted for all those offsets and managed to move all the data around to the correct places. ExifTool tries its best, but there are known limitations and nobody can guarantee this universally.
There were several issues around arguing darktable could have killed raw files …
Up to now there’s a simple answer: since darktable never writes to raw files nobody can blame darktable for weird raw files…
You can try to do it via lua scripts on your own risk.
There‘re a lot of new darktable users around that refuses to read manual or simply do uninformed things they’ve done in other tools.
So no need to give them the gun to shoot themselves in the foot
I understand both views. I have an Olympus body that adds a stupid “OLYMPUS DIGITAL CAMERA” into ImageDescription field. I also like to geotag my images and my camera body doesn’t have a GPS, so I need to add the geolocation in the postprocessing. I wanted the stupid “OLYMPUS DIGITAL CAMERA” out of my metadata so it don’t spread to JPGs/TIFFs and I want the geolocation goes with the image. I feel these and the artist and copyright information are part of the raw.
For the other tags like keywords and for the editing data, I think the sidecar is a good solution. It is good both for data integrity and also changing the tags is much faster when you don’t need to read and write a raw of 20+MB.
I understand the philosophy in dt: if you don’t touch it, you cannot break it. I have a work-around with exiftool and Geosetter that requires some extra steps and takes some extra time and care, but as I’m not a professional photographer with hundred(s) images a day, I can live with the restrictions.
So, you have some anecdotal evidence that for a particular raw file format, after updating 2 particular XMP fields, you didn’t notice any obvious corruption issues when subsequently opening those files with some particular software. This is nice for you, and it is up to you to decide if you want to continue to take the risk that no other conditions will ever arise under which the outcome may not be so positive.
You’re probably best off making a copy and changing that file before sending it off. You don’t want silent corruption making it’s way into the backups. Do you frequently share raw files? I’ve rewritten stuff before but I’m very uneasy about it. Made the call it was worth it for those files.
I just did a test, I changed the creator tag and exported a jpeg. The file shows the correct changed creator when viewed in Geeqie.
This use case is precisely what xmp sidecars are about. A safe way of tagging files and ensuring it propagates regardless of software used.