dcmjs-org / dcmjs

Javascript implementation of DICOM manipulation
https://dcmjs.netlify.com/
MIT License
296 stars 112 forks source link

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

Closed richard-viney closed 2 years ago

richard-viney commented 2 years ago

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 commented 2 years ago

Looks very nice - thank you 🙏

github-actions[bot] commented 2 years ago

:tada: This PR is included in version 0.24.6 :tada:

The release is available on:

Your semantic-release bot :package::rocket: