-
Notifications
You must be signed in to change notification settings - Fork 107
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fujifilm_dynamic_range only sets bias for first image when importing duplicates #390
Comments
Here are better steps to reproduce, without requiring any filesystem-level work. This is to show that the current code can result in inconsistent state:
|
You are right. |
@phweyland: Thanks for looking at this. I can take a look at fixing that in the C code, unless you're on top of that? I also noticed that if I import an image with two XMP files, darktable tells the user that it imported 1 image. Which is technically true (one raw file was imported), but confusing (as two images are present in the lighttable view).
I'm not sure. There is a route where it is read from the exif tag
Yes, in the case of this script. It's a workaround. Ideally exiv2 could do this work within darktable's C import code. But last I checked it couldn't read the relevant tag. So instead the lua script does a (very slow) call to exiftool which can read the tag. Ideal would be to get support for reading this tag into exiv2. I think it involves implementing a new datatype. I have this idea @kmilos works on exiv2 and would be able to speak to it better. |
exiv2 should have no problem reading Not sure I understand what's the question here, sorry... |
There's one which Fujifilm writes that exiv2 can't read, even in v.0.27.5:
The tag is encoded as a 4-byte ratio of two signed shorts, which I don't think exiv2 can currently read. There is also ab exiv2-readable So from exiv2 POV, it seems like there'd be two routes:
From darktable POV, the workaround is the lua script and calls to exiftool, which is 10x slower than exiv2. |
I'm not on top of that. If I've worked on image_import(), the duplicate part remains a bit tricky for me. Please feel free to propose something ! |
Will take a look... I looked at it a year or so. I know there's been some good work on it recently -- and it's working much better. |
Ah, this one is in a completely separate block of the RAF file that exiv2 currently does not parse indeed. |
Interesting. Is it constructive to open an issue about this in the exiv2 project? |
It's already open, as linked. You might want to just chime in that you'd like this field to be parsed. No idea when someone will get around to implementing this though... |
When an image is imported with extant duplicates (multiple XMP files per raw file) and fujifilm_dynamic_range is enabled, the raw exposure bias will be set for only the first of the duplicates.
Test case:
The exposure bias of the two duplicates won't match. The first will be non-zero (-0.7, -1.7, or -2.7). The second will show a exposure bias of +0.0.
In the usual case of importing un-edited photographs and making duplicates, everything is fine -- the exposure bias is copied with the duplicate. But things break when importing a directory with extant sidecar files with duplicates. In this case, the exposure bias is lost for all but the first image.
The problem is that fujfilm_dynamic_range catches the
post-import-image
signal on RAF file import, and then only sets the exposure bias for the first of the duplicates.I haven't looked into a solution yet (is there an obvious way to traverse duplicates via the lua API?), but wanted to document this.
An underlying problem may be that exposure bias is stored in the database, but not in sidecar files. If it were stored in the sidecar, then perhaps fujifilm_dyamic_range could be coded to not set the exposure bias if an image has the
is_altered
flag set to true.The text was updated successfully, but these errors were encountered: