-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
cleanup exif data #16491
cleanup exif data #16491
Conversation
See discussion in darktable-org#16479 It turned out that exiv2 gives a whole zoo of manufacturer specific values for the white balance. In some cases where a camera value has no representation by exiv2, the color temperature value is returned, in a not well formated way with trailing spaces. Improvements/fixes: - remove trailing spaces - `not defined` and `unknown` are now treated as the darktable default `unnamed` - entries are now compared case-insensitive before they get written to the database. This avoids having duplicates like `Cloudy` and `CLOUDY` - if a numeric exif value `n` has no textual representation in exiv2 the returned string is `(n)` which is pretty much useless so it is discarded now - fixed a bug in `collection.c` where `strlen()` was used instead of `g_utf8_strlen()`. This failed on strings containing special characters (e.g. german umlauts)
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.
Some minor style issues to fix.
One comment, in the description you have:
not defined and unknown are now treated as the darktable default unnamed
Where is this happening? I cannot see this in the code...
Not defined and unknown are the texts coming from exiv2 if the exif value is
So I simply avoid setting the text by checking the exif value. In case of |
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.
Lot better now, the collection entries are clean. Thanks a lot!
See discussion in #16479
It turned out that exiv2 gives a whole zoo of manufacturer specific values for the white balance. In some cases where a camera value has no representation by exiv2, the color temperature value is returned, in a not well formated way with trailing spaces.
Improvements/fixes:
not defined
andunknown
are now treated as the darktable defaultunnamed
Cloudy
andCLOUDY
n
has no textual representation in exiv2 the returned string is(n)
which is pretty much useless so it is discarded nowcollection.c
wherestrlen()
was used instead ofg_utf8_strlen()
. This failed on strings containing special characters (e.g. german umlauts)