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

fix(fragment): write padding to even length on final fragments of encapsulated frame data #294

Merged
merged 1 commit into from
Jul 21, 2022
Merged

fix(fragment): write padding to even length on final fragments of encapsulated frame data #294

merged 1 commit into from
Jul 21, 2022

Conversation

richard-viney
Copy link
Contributor

@richard-viney richard-viney commented Jul 17, 2022

A padding byte for odd-length encapsulated binary data was being written at the end of writing the OB tag, but padding bytes need to be written for each frame, not the whole tag. That is, the last fragment for each frame should get a padding byte if that frame's data is of uneven length. This is also the behaviour of pydicom.

Closes #293.

@pieper
Copy link
Collaborator

pieper commented Jul 21, 2022

Looks very nice - thank you 🙏

@pieper pieper merged commit 3ac3a64 into dcmjs-org:master Jul 21, 2022
@github-actions
Copy link

🎉 This PR is included in version 0.24.6 🎉

The release is available on:

Your semantic-release bot 📦🚀

@richard-viney richard-viney deleted the fix-fragment-padding-byte branch July 24, 2022 01:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Encapsulated pixel data of odd-length writes padding byte in incorrect location
2 participants