-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Fix flash firing detection #18415
Fix flash firing detection #18415
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks!
And I do not see those strings in |
When building the macOS installation package I explicitly copy the exiv2 translations to |
So I don't see how to solve this. The exiv2 strings may be translated or not and darktable has no way to check for possible translation has it has no idea about the strings in exiv2. |
I think this should be reverted, see #18424 |
I'd say I should find a better solution instead of reverting. Just reverting will put us back in the state with other errors in flash detection. The new issue is the result of the fact that I forgot when writing the detection function that the string from exiv2 can be empty. And that I tested on an insufficiently diverse set of images... :( Simply adding this check makes no sense, as a completely different solution is needed. Both my PR and the code before it are incorrect in a situation where strings from exiv2 change depending on the language. |
that exif tag is actually a number, so that raw value should be used instead of string, which is also an easier test: https://stackoverflow.com/questions/7076958/read-exif-and-determine-if-the-flash-has-fired |
@parafin Yes, I am testing this very method right now. This was exactly the solution I wrote about. |
The promised correct solution: #18437 |
"Yes" at the beginning of the string does not mean that the flash fired, but that the flash function is present (for example, there is a built-in flash or an external flash is connected). There is a string from exiv2 "Yes, did not fire" for which checking only the first letter gave a false detection of the flash firing.
Similarly, not only "Y" as the first letter indicates the flash firing, the string obtained from exiv2 can also begin with the word "Fired".
Also removed "n/a" as the content of the text variable that indicates "flash firing". In fact, we always know whether the flash fired or not, "n/a" is meaningless.