Skip to content
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

Treat Exif.Sony1.PreviewImage as undefined tag #2015

Merged
merged 1 commit into from
Dec 5, 2021

Conversation

kevinbackhouse
Copy link
Collaborator

Fixes: #2001

We should treat Exif.Sony1.PreviewImage as an undefined tag, as suggested by @clanmills in this comment.

In the future, we may be able to do something more sophisticated with Exif.Sony1.PreviewImage. For example, something like what I tried in #2008 might enable us to correctly update the offset that's stored in the tag when modifying the metadata causes us to change the size of the file.

@codecov
Copy link

codecov bot commented Dec 5, 2021

Codecov Report

Merging #2015 (a1ad29e) into main (fde8ed0) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2015      +/-   ##
==========================================
+ Coverage   61.16%   61.17%   +0.01%     
==========================================
  Files          96       96              
  Lines       19255    19251       -4     
  Branches     9862     9858       -4     
==========================================
  Hits        11777    11777              
+ Misses       5135     5134       -1     
+ Partials     2343     2340       -3     
Impacted Files Coverage Δ
src/tiffvisitor_int.cpp 76.12% <100.00%> (-0.11%) ⬇️
src/jpgimage.cpp 70.48% <0.00%> (+0.56%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update fde8ed0...a1ad29e. Read the comment docs.

Copy link
Collaborator

@clanmills clanmills left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perfect. Less code is almost always better. In this case, it get us totally out of trouble.

The tag is always treated as "unknown/count==0". The tag is still understood and documented:

$ taglist ALL | grep Sony1 | grep PreviewImage | grep -v Size
Sony1.PreviewImage,8193,0x2001,Sony1,Exif.Sony1.PreviewImage,Undefined,"JPEG preview image"
Sony2.PreviewImage,8193,0x2001,Sony1,Exif.Sony1.PreviewImage,Undefined,"JPEG preview image"
$ 

If David works on this, we might give this more tuning/polish. However for now it get us out of trouble. I've very pleased about this.

@kevinbackhouse
Copy link
Collaborator Author

@Mergifyio backport 0.27-maintenance

@mergify
Copy link
Contributor

mergify bot commented Dec 5, 2021

backport 0.27-maintenance

✅ Backports have been created

kevinbackhouse added a commit that referenced this pull request Dec 14, 2021
Treat Exif.Sony1.PreviewImage as undefined tag (backport #2015)
@kevinbackhouse kevinbackhouse added this to the v1.00 milestone Dec 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

exiv2 occasionally crashes
2 participants