-
Notifications
You must be signed in to change notification settings - Fork 279
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
Canon maker note corruption in v1.0.0 and v0.28.0 #2138
Comments
Great find, @jim-easterbrook. Keep 'em flowing. |
Experimenting with the v1.0.0 exiv2 command line tool shows different changes to the Canon maker note values depending on which non-Canon tags I set. |
Here's a minimal example (in Python I'm afraid, but I hope the C++ equivalent is obvious) using libexiv2 compiled from the GitHub repo as it was this morning. The image file had not been modified since copying it from my EOS 100D camera.
Doing the same with libexiv2 v0.27.5 reduces the MakerNote count to 7874 instead of 7872. |
Printing out all the exif values (with the exiv2 tool compiled today) shows no difference (other than the maker note binary values) when the file is modified by libexiv2 v0.27.5, but the |
Another test - setting some metadata:
Comparing the exif values after running this with 0.27.5 and 1.0.0 I get this:
I think these are mostly offset changes because of the difference in length of the maker note. |
I see this bug is present in the 0.28.0 release that's just come out. |
When creating a new version from the |
I assume this is related to, or even a duplicate of, bug #2746. I'll watch for developments there. |
Just trying exiv2 command line tool versions 0.27.5 versus 1.00.0.9 (current git main branch) and comparing the new Canon maker note tags with the old I find this inconsistency. Old version:
New version:
The old |
The above is with a non-Canon lens. Looking at a different file with a Canon 18-55mm kit lens I find these values of interest:
422576128 in hex is |
I think I've worked out how to fix this bug, just need to add a print function to do the byte to hex conversion for display. Then I'll submit a PR. |
@jim-easterbrook Is the fix confirmed, can we close this now? |
Yes, I just tried latest 0.28.x branch and it's doing what I expect. |
Thanks, closing then. |
A minor difference rather than a bug...
Jpeg files from my Canon EOS 100D have an
Exif.Photo.MakerNote
of 7898 bytes, as reported by the exiv2 command line tool. After modifying some metadata (not any Canon tags) in my own software this gets truncated to 7768 bytes when using libexiv2 v0.27.5, but when using v1.0.0 (nightly Linux64 build) it gets truncated to 7766 bytes. I noticed this because the tagExif.CanonLe.0x0007
doesn't get saved.The text was updated successfully, but these errors were encountered: