Project

General

Profile

Bug #11770

export file name from exif tag inconsistent

Added by Nikolai Försterling 4 months ago. Updated 4 months ago.

Status:
Confirmed
Priority:
Low
Assignee:
Category:
General
Target version:
-
Start date:
10/16/2017
Due date:
% Done:

10%

Affected Version:
2.2.5
System:
Ubuntu
bitness:
64-bit
hardware architecture:
amd64/x86

Description

One thing i experienced with the D7100 before (but didn't mind until now) happens to my new D750 as well.

Export path is for example "/mnt/pixtmp2/pix/2017/$(EXIF_YEAR)$(EXIF_MONTH)$(EXIF_DAY)_$(EXIF_HOUR)$(EXIF_MINUTE)$(EXIF_SECOND)_$(MODEL)_$(SEQUENCE".
All images are from the same shooting, nothing changed in between in camera or darktable settings.
If i export selected or all images, some of them do get a different name from the "model" tag (within the same export action)

Screenshot_20171016_004340.png (58.4 KB) Nikolai Försterling, 10/16/2017 01:46 AM

Screenshot_20171023_223855.png - Same lens, but obviously different internal id (19.2 KB) Nikolai Försterling, 10/23/2017 11:40 PM

History

#1 Updated by Tobias Ellinghaus 4 months ago

When looking at the image information module on the left of the lighttable, what is given there as the model for those pictures?

#2 Updated by Nikolai Försterling 4 months ago

Sorry, i should have checked that before.
Indeed some Images have D750 as model tag and most do have "NIKON D750" in the image information on the lighttable.
The only thing in common i could find so far is that those with "D750" do have flags "3..r..ap...r", while the others lack the trailing "r".
All have been imported at once after moving them from SD-Card with "Rapid Photo Downloader".
It does just the formatting of the NEF's filename from exif tags (model is just "D750" in the RAW's exif data)

#3 Updated by Tobias Ellinghaus 4 months ago

  • Assignee set to Roman Lebedev

The last 'r' indicates that the image was loaded with rawspeed. I assume that opening an image without the 'r' in darkroom will add the 'r' and might even change the model?

Roman: name mangling I suppose?

#4 Updated by Roman Lebedev 4 months ago

  • % Done changed from 0 to 10
  • Status changed from New to Confirmed

Nikolai Försterling wrote:

Indeed some Images have D750 as model tag and most do have "NIKON D750" in the image information on the lighttable.
The only thing in common i could find so far is that those with "D750" do have flags "3..r..ap...r", while the others lack the trailing "r".

Tobias Ellinghaus wrote:

The last 'r' indicates that the image was loaded with rawspeed. I assume that opening an image without the 'r' in darkroom will add the 'r' and might even change the model?

Roman: name mangling I suppose?

I can confirm these findings.
Once the image is loaded into darkroom, or the actual thumbnail (i.e. not the one from exif) is generated, the model is updated.
Also, if i import just one image, export it, and export it again, the model differs between those two exports.

So i supposed the question is, can we make export module notice the updated model (and other metadata).
Maybe it is as simple as expanding the output filename at the very end, after the pipe has finished.

#5 Updated by Tobias Ellinghaus 4 months ago

Isn't the real bug that dt changes the model at all? It should fill those fields once when importing the image and never touch them again.

#6 Updated by Roman Lebedev 4 months ago

Tobias Ellinghaus wrote:

Isn't the real bug that dt changes the model at all? It should fill those fields once when importing the image and never touch them again.

This is the code that updates these fields:
https://github.com/darktable-org/darktable/blob/d35fc6864a6242308e10ac08c44bf2cf1c77e45f/src/common/imageio_rawspeed.cc#L144-L147

As far i'm concerned, it requires actually decoding the image...

#7 Updated by Tobias Ellinghaus 4 months ago

I know where it's coming from. What I am questioning is the decision to rewrite the image metadata at all. If some parts of the code require different maker/model entries then we should add those as new fields to the dt_image_t struct (or the db if they are ever needed without first decoding the file) and leave the user visible strings alone.

#8 Updated by Nikolai Försterling 4 months ago

I can confirm that this (rewrite metadata) internally also happens to lens data; i do have many images only processed with DT that do have a different (but nominal same) lens data. DT seems to assign different metadata/id (but same lens name) to lens used for an image; noticed that while sorting by lens in lighttable (screenshot attached).

Also available in: Atom PDF