Keywords in RAW-File

Hello,
does anyone know if it is possible to write keywords or annotations directly in the raw file? Specifically I mean the rw2 from Panasonic? I tried several times with digiKam but I did not manage to actually write the info in the file.
Thank you in advance

By default Syncthing only writes to sidecar files for raws. For some type of raws it’s not supported at all to write directly to them. And I don’t remember certainly, but maybe the option to write metadata directly to raw has been removed entirely - again, I am not certain if that’s the case, check yourself in the settings.

General comment: it might look comfortable and even if it were possible, that would be a terrible idea.

  • You destroy consistency in your raw-files since the manufacturers do not provide free libraries to edit the raw-files. And even if they did, they would probably be as buggy as any other software. Are your images worth the risk?

  • You just multiplied your backup times by a thousandfold. XMP sidecar files are tiny compared to RAW. Changing a single keyword in a single file might not look like much, but edit a few hundred images and it will be painful.

Do not change your RAW files after they were written in the camera. Ever.
You can thank me later for not having problems.

Thank you very much for this info. If it is so, I do not have to look any longer. But my current digiKam offers it even if it does not work.

Some raw files can be edited without any apparent problems. For example, where a.NEF is a copy of a Nikon D800 raw file:

exiftool -verbose -copyright=HelloWorld a.NEF

The edited a.NEF can then be processed by dcraw, with identical results to the original file from the camera.

However, personally, I would never use a workflow that edited raw camera files.

My version of digikam (7.2.0) has the following text for the “write to raw files” option:

“If possible write metadata to RAW files (dangerous)” (bolding is mine)

So it’s not adviced even there, and writing keywords might just not be possible.
Changing e.g. the capture time should be possible as a relatively safe operation: the field exists, and is of constant length, so you only change a few bytes in the file. Adding tags/keywords would mean adding bytes to the file, causing shifts in everything following the keywords. Rather dangerous if you forget to update a reference or offset somewhere (you may not even know that such an offset exists…)

And of course, what works on one raw format, may not work on another (even from the same manufacturer)

1 Like

Hello rvietor,
my search for writing keywords to the raw file has come to an end with this. Your description finally makes me understand why this is problematic.
In the meantime I found out that writing to Raw works with XnViewMP, but I prefer to leave it alone.

Thank you very much.

Meanwhile I converted all my raf (Fuji) and rw2 (Panasonic) with Adobe DNC (wine). Now I write everything I need with digiKam into this .dng-files and I am very happy with this solution.

Please keep.your original raw files!

Hi,

You might want to read this from one of the exiftool developer (from what I know): Writing metadata: To raw or not to raw?

Here’s an excerpt:

My personal opinion (if you’re interested)
Image metadata is data about image -it’s actually part of image data. And as such, it belongs inside image file. Saying that, I refuse to use software, which isn’t capable to write metadata safe directly inside image files or read metadata I’ve saved inside image files previously.
Using ExifTool, I write metadata inside my Canon raw files for years successfully. And I don’t need any additional (expensive) software, to keep track of where my metadata is -it’s always there, where image file is.

1 Like

It’s good to know that someone has confidence in exiftool. Well, they did, 10 years ago, for Canon files.

Yeah, there’s always a risk involved (lightning can strike in PC)…

It has happened to me. When a thunderstorm arrived, I was 45 minutes away from a deadline, so didn’t take my usual precaution of powering down and unplugging everything. Flash, bang, and the power tripped out. When it came back up, the computer wouldn’t boot. I extracted the hard drive, inserted it as the second drive to a spare computer and (when the thunderstorm had gone) I was back in business, with all my data. Phew. I reckoned a surge on the power line had fried the motherboard. The point is, bad things do happen.

I have no reason to distrust exiftool. I has always worked well for me. But nor do I have a good reason to trust it. If I used it to edit camera files I would need to:

  1. Run a comprehensive test suite against each new version of exiftool, for each camera model.

  2. Archive every original camera file, and edit copies of those, and maintain the archive of originals so it was always available.

  3. Both of the above.

This would be a pain. For me, it would be a bigger pain than my current system, which includes a separate simple database of locations, subjects, keywords etc.

Hello @paperdigits
Your note shocks me - especially since I just converted all my raw to dng and then deleted the rw2 and raf.
With a huge amount of effort I could reverse everything from a suitable backup, hoping not to be confused with the current photos.
My question: is it really dangerous to replace the camera RAW for dng? Can’t the dng be trusted?

Or are your worries only if I write the keywords in the dng?

I don’t trust adobe to do the right thing with my files and that is what you’ve done. What’s the use of dng when most raw processing programs support both RAF and cr2? What are you gaining by converting to dng?

1 Like

Hello @paperdigits
Adobe is not loved for good reasons.
The big advantage of converting my rw2 to dng is:

  1. the embedded jpegs in the dng are full size, the ones in the rw2 are much smaller - and so I can compare much very well which of my shots turned out better, in the case, sharper. This saves me from having to shoot jpeg in addition to raw when shooting.
  2. digiKam can now easily write tags to the file. I.e. when I move the files with other programs, all the metadata is not lost. This is the biggest advantage for me.
  3. The smaller file size is not so important for me.
    My question, regardless of whether you like Adobe or not: is there a risk of data loss if I convert my rw2 to dng and then delete it?
    And how about embedding the original raw into the dng in addition if need be?

You have certainly lost some of the original data in the conversion, as the metadata is not transfered 1:1 to the dng. Did you use the demoasiced dng? Then your file isn’t even raw anymore its a tif.

Hello @paperdigits,
have a look here: RawTherapee does not seem to have any objections to dng.
http://rawpedia.rawtherapee.com/How_to_convert_raw_formats_to_DNG

You’ll see that the first section is called “unsupported sensors.” They recommend converting to dng if RT does not support your camera. It is not a general recommendation.