Darktable 3.0 Exif on export

congrats to dt 3.0. I like to understand how the new exportation options work. On image exportation I like to have

Make (Camera)
Camera Model Name
Lens Info
Lens Make
Lens Model
Exposure Time
Focal Lenght

I don’t like

Camera Serialnumber
Lens Serialnumber
Development History

Turning on “exif data” will export everything including unwanted data. But I can’t find the corresponding tag to redefine the exif data on serialnumbers etc.

Can you clarify how this new option works in dt 3.0?


I think you have to deactivate EXIF data and then add single Tags ("+" sign on the right).

Today you can act individually on the tags which are in the list:


The selected tags are calculated if you give a formula or removed if you let the formula empty.

Thank you @phweyland and @Thomas_Do . What you describe is what I expected, too. But selecting one tag requires a formular. And if there is no variable in the formular, you will get values that are not correct or the value keeps empty.

One example is “Exif.Photo.Aperture” or “Exif.Photo.FNumber”. I can’t find the corresponding variable.

So how do I get the aperture or f-number to the image I want to export? Because of


is a corresponding variable I tried




which I found in the preferences for the GUI. But that variables don’t work

Aperture an FNumber are only examples. Theres are other variables missing


I did some testing with an older image. Aperture f/2.8, ISO 100, focal length 24mm, exposure 1/1600. I set some values with variables and checked with exiftool after exporting. The result:

$(EXIF_APERTURE) → exiftool is reporting a value of 1.0, should be 2.8
$(EXIF_ISO) → exiftool is reporting a value of 100 = correct
$(EXIF_EXPOSURE) → exiftool is reporting a value of 1, should be 1/1600
$(EXIF_FOCAL_LENGTH) → exiftool is reporting a value of 24 mm = correct

Is this a bug or is my understanding of the export options wrong?


2 points.

The available variables are here:
So the ones you try to use do not exist.

Then the current list of tags (snapshot above) is currently limited.
I’m trying to get them directly from exiv2. This would provide a complete list of tags which can be used with an image.

NB. exif tags come straight away from raw image (except maybe geo tags for example). So you don’t need to set them. Here the utility would be to remove them from the exported file (no formula), if you don’t want them.

Thank you very much. But when I want to remove the serial number of camera and/or lens, how do I do this when the tag is missing in the utility?

And when only the variables supported from the snapshot you sent, why is $(EXIF_FOCAL_LENGTH) working? The variable is not in the list.

Will there come more variables with next updates of darktable?


Could you share a snapshot of your formula settings ?

I don’t know if somebody works on this currently …

Here is the snapshot of the settings with which I tested.

The settings are only for testing purpose

you are correct, they do exist (in the manual):
So they should work.
Could you open an issue Issues · darktable-org/darktable · GitHub ?

@phweyland Thank you for spending time on this.
I opened an issue and hope that will be fixed soon :slight_smile:


See PR #3951

1 Like

The variable expansion does what it is intended to do. However this expansion is sometimes not compatible with the format of the exiv2 tag, in particular when its type is Rational or SRational.
I don’t see any simple solution for that. One possibility would be to create a specific variable for each problematic exiv2 tag. I’m not convinced this is desirable (case by case stuff, maintenance issue, …).

But I think your initial need may be satisfied. In fact you wanted to remove exif tags except some of them. For that we don’t need the variable expansion.
I’ll try to find a way to do it.

I suggest this the following. If you have disabled exif tags but you want to see some of them you enter the sign “=” in the formula.


1 Like

@phweyland Thank you, your suggestion sounds great. Is it possible to remove the serial number of the camera and the lens with this new solution or is the serial number one of the problematic exiv2 tag?
How can I play with this new solution, is it already in the the actual git version?

Yes, as exif data can be disabled.
Then with the formula “=” you can force the exif tags you need.

If you can build dt, you can fetch the code from the PR above. Otherwise you need to wait …

1 Like

Hello @phweyland,
Thank you very much. Now I had the opportunity to try the export of the Exif data. This is perfect. Thanks again and I hope that your change will be implemented and published in the official code quickly.