Add Canon CR3 raw file support #44
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Continuing the discussion from #41 because I pushed something unrelated to the main branch in my fork, I think it's better to have an explicit feature branch anyway.
Anyway I have working support for parsing tags from CMT1/CMT2/CMT3 boxes, which is important because basic tags like "Date/Time Original" are not in CMT1. I did not go with the MultiExifIter because I think it's too confusing for applications to have to know whether to use ExifIter or MultiExifIter. You can see an example of how I used the library in https://github.com/rolandd/photosync/blob/main/src/pipeline.rs - I do think the correct API is to let consumers get information about media files without having to know about the specific format.
The concerns about handling duplicate tags don't seem worth worrying about to me - we already could have a malformed file with the same tag multiple times in a single box, and my camera at least does not put the same tag in different boxes either.
This branch includes the cleanups that I submitted separately in #43 too.