-
Notifications
You must be signed in to change notification settings - Fork 42
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
Add list of fields found #15
Comments
most of the values should be set to an invalid default value, so you can check if it was read or not; do you have something in particular you need to know? |
@cdcseacave I would like to know which fields from the EXIF that were set on the file, even if it had an invalid value. An example is the |
one way is to modify the code to not set it to 0 by default, but a value that can not exist |
@cdcseacave here is an use-case where that would not work: Imagine that an user wants to detect invalid (or corrupt) fields inside the exif. Another case scenario is that the user wants to log every key and value (including invalid ones) found inside the exif file. Adding to my last proposal of solution for this issue, we could use |
It would be great to have a vector or set containing the names of the fields that were found when decoding the EXIF data.
Not having it is a problem since the fields have default values that could be valid and (I guess that) it is not possible to detect otherwise.
Another option is to use
std::optional
on the fields, which may be better, but may break old implementations if/when they update TinyEXIF. Also, it requires C++17.An example where this problem may arise is when
0
, despite being unknown, is a possible input value, and developers will not be able to distinguish between the unknown and the missing.I just added a branch to my fork of this repository that apply the change above, but I'm unsure if I should create a pull request for it.
The text was updated successfully, but these errors were encountered: