-
Couldn't load subscription status.
- Fork 100
fix: xmp jpeg write #1156
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
fix: xmp jpeg write #1156
Conversation
Adding the manifest url to large XMP segments could cause the XMP data to exceed the limit of 65503 bytes. There were 3 causes of this issue: 1. Extra whitespace from formatting. The quick_xml writer shiftwidth could be much larger than that of the original. Potentially adding several KB of whitespace. 2. Manifest url added multiple times. The manifest url was added to multiple keys within the XMP data. 3. Lack of padding awareness. According to the spec, XMP segments should have 2KB to 4KB of padding. The padding should be adjusted to keep the XMP data length the same with the addition of the remote manifest url. This is important for data hashes as it keeps the offsets of the JPEG metadata the same.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1156 +/- ##
==========================================
+ Coverage 79.56% 79.59% +0.02%
==========================================
Files 147 147
Lines 40541 40582 +41
==========================================
+ Hits 32258 32301 +43
+ Misses 8283 8281 -2 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
3fa75eb to
c3710b7
Compare
Changes in this pull request
Adding the manifest url to large XMP segments could cause the XMP data
to exceed the limit of 65503 bytes.
There were 3 causes of this issue:
could be much larger than that of the original. Potentially adding
several KB of whitespace.
multiple keys within the XMP data.
have 2KB to 4KB of padding. The padding should be adjusted to keep
the XMP data length the same with the addition of the remote manifest
url. This is important for data hashes as it keeps the offsets of the
JPEG metadata the same.
Checklist
TO DOitems (or similar) have been entered as GitHub issues and the link to that issue has been included in a comment.